Commit 36881c9e8772663c9522fea40c4e64a5efa627f1

Authored by Victor Costa
1 parent 19261527

rails3: change from lambda to proc

app/models/enterprise_homepage.rb
... ... @@ -18,7 +18,7 @@ class EnterpriseHomepage < Article
18 18  
19 19 def to_html(options = {})
20 20 enterprise_homepage = self
21   - lambda do
  21 + proc do
22 22 extend EnterpriseHomepageHelper
23 23 extend CatalogHelper
24 24 catalog_load_index :page => 1, :show_categories => false
... ...
app/models/fans_block.rb
... ... @@ -14,7 +14,7 @@ class FansBlock < ProfileListBlock
14 14  
15 15 def footer
16 16 profile = self.owner
17   - lambda do
  17 + proc do
18 18 link_to _('View all'), :profile => profile.identifier, :controller =>
19 19 'profile', :action => 'fans'
20 20 end
... ...
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
... ...