Commit 36881c9e8772663c9522fea40c4e64a5efa627f1
1 parent
19261527
Exists in
master
and in
29 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
| @@ -18,7 +18,7 @@ class EnterpriseHomepage < Article | @@ -18,7 +18,7 @@ class EnterpriseHomepage < Article | ||
| 18 | 18 | ||
| 19 | def to_html(options = {}) | 19 | def to_html(options = {}) |
| 20 | enterprise_homepage = self | 20 | enterprise_homepage = self |
| 21 | - lambda do | 21 | + proc do |
| 22 | extend EnterpriseHomepageHelper | 22 | extend EnterpriseHomepageHelper |
| 23 | extend CatalogHelper | 23 | extend CatalogHelper |
| 24 | catalog_load_index :page => 1, :show_categories => false | 24 | catalog_load_index :page => 1, :show_categories => false |
app/models/fans_block.rb
| @@ -14,7 +14,7 @@ class FansBlock < ProfileListBlock | @@ -14,7 +14,7 @@ class FansBlock < ProfileListBlock | ||
| 14 | 14 | ||
| 15 | def footer | 15 | def footer |
| 16 | profile = self.owner | 16 | profile = self.owner |
| 17 | - lambda do | 17 | + proc do |
| 18 | link_to _('View all'), :profile => profile.identifier, :controller => | 18 | link_to _('View all'), :profile => profile.identifier, :controller => |
| 19 | 'profile', :action => 'fans' | 19 | 'profile', :action => 'fans' |
| 20 | end | 20 | end |
app/models/favorite_enterprises_block.rb
| @@ -15,7 +15,7 @@ class FavoriteEnterprisesBlock < ProfileListBlock | @@ -15,7 +15,7 @@ class FavoriteEnterprisesBlock < ProfileListBlock | ||
| 15 | def footer | 15 | def footer |
| 16 | owner = self.owner | 16 | owner = self.owner |
| 17 | return '' unless owner.kind_of?(Person) | 17 | return '' unless owner.kind_of?(Person) |
| 18 | - lambda do | 18 | + proc do |
| 19 | link_to _('View all'), :profile => owner.identifier, :controller => 'profile', :action => 'favorite_enterprises' | 19 | link_to _('View all'), :profile => owner.identifier, :controller => 'profile', :action => 'favorite_enterprises' |
| 20 | end | 20 | end |
| 21 | end | 21 | end |
app/models/slideshow_block.rb
| @@ -38,11 +38,11 @@ class SlideshowBlock < Block | @@ -38,11 +38,11 @@ class SlideshowBlock < Block | ||
| 38 | if shuffle | 38 | if shuffle |
| 39 | images = images.shuffle | 39 | images = images.shuffle |
| 40 | end | 40 | end |
| 41 | - lambda do | 41 | + proc do |
| 42 | render :file => 'blocks/slideshow', :locals => { :block => block, :images => images } | 42 | render :file => 'blocks/slideshow', :locals => { :block => block, :images => images } |
| 43 | end | 43 | end |
| 44 | else | 44 | else |
| 45 | - lambda do | 45 | + proc do |
| 46 | render :file => 'blocks/slideshow', :locals => { :block => block, :images => nil } | 46 | render :file => 'blocks/slideshow', :locals => { :block => block, :images => nil } |
| 47 | end | 47 | end |
| 48 | end | 48 | end |
app/models/tags_block.rb
| @@ -43,13 +43,13 @@ class TagsBlock < Block | @@ -43,13 +43,13 @@ class TagsBlock < Block | ||
| 43 | 43 | ||
| 44 | def footer | 44 | def footer |
| 45 | if owner.class == Environment | 45 | if owner.class == Environment |
| 46 | - lambda do | 46 | + proc do |
| 47 | link_to s_('tags|View all'), | 47 | link_to s_('tags|View all'), |
| 48 | :controller => 'search', :action => 'tags' | 48 | :controller => 'search', :action => 'tags' |
| 49 | end | 49 | end |
| 50 | else | 50 | else |
| 51 | owner_id = owner.identifier | 51 | owner_id = owner.identifier |
| 52 | - lambda do | 52 | + proc do |
| 53 | link_to s_('tags|View all'), | 53 | link_to s_('tags|View all'), |
| 54 | :profile => owner_id, :controller => 'profile', :action => 'tags' | 54 | :profile => owner_id, :controller => 'profile', :action => 'tags' |
| 55 | end | 55 | end |