Commit 36881c9e8772663c9522fea40c4e64a5efa627f1
1 parent
19261527
Exists in
master
and in
22 other branches
rails3: change from lambda to proc
Showing
5 changed files
with
7 additions
and
7 deletions
Show diff stats
app/models/enterprise_homepage.rb
app/models/fans_block.rb
app/models/favorite_enterprises_block.rb
| ... | ... | @@ -15,7 +15,7 @@ class FavoriteEnterprisesBlock < ProfileListBlock |
| 15 | 15 | def footer |
| 16 | 16 | owner = self.owner |
| 17 | 17 | return '' unless owner.kind_of?(Person) |
| 18 | - lambda do | |
| 18 | + proc do | |
| 19 | 19 | link_to _('View all'), :profile => owner.identifier, :controller => 'profile', :action => 'favorite_enterprises' |
| 20 | 20 | end |
| 21 | 21 | end | ... | ... |
app/models/slideshow_block.rb
| ... | ... | @@ -38,11 +38,11 @@ class SlideshowBlock < Block |
| 38 | 38 | if shuffle |
| 39 | 39 | images = images.shuffle |
| 40 | 40 | end |
| 41 | - lambda do | |
| 41 | + proc do | |
| 42 | 42 | render :file => 'blocks/slideshow', :locals => { :block => block, :images => images } |
| 43 | 43 | end |
| 44 | 44 | else |
| 45 | - lambda do | |
| 45 | + proc do | |
| 46 | 46 | render :file => 'blocks/slideshow', :locals => { :block => block, :images => nil } |
| 47 | 47 | end |
| 48 | 48 | end | ... | ... |
app/models/tags_block.rb
| ... | ... | @@ -43,13 +43,13 @@ class TagsBlock < Block |
| 43 | 43 | |
| 44 | 44 | def footer |
| 45 | 45 | if owner.class == Environment |
| 46 | - lambda do | |
| 46 | + proc do | |
| 47 | 47 | link_to s_('tags|View all'), |
| 48 | 48 | :controller => 'search', :action => 'tags' |
| 49 | 49 | end |
| 50 | 50 | else |
| 51 | 51 | owner_id = owner.identifier |
| 52 | - lambda do | |
| 52 | + proc do | |
| 53 | 53 | link_to s_('tags|View all'), |
| 54 | 54 | :profile => owner_id, :controller => 'profile', :action => 'tags' |
| 55 | 55 | end | ... | ... |