Commit eaf3e2fc9f4ab3ce5921a4e551f58d412a2ffe10

Authored by Rodrigo Souto
1 parent 78acd19c

rails3: replace misuse of lambda in the place of proc

Further information:
http://stackoverflow.com/questions/1740046/whats-the-difference-between-a-proc-and-a-lambda-in-ruby/1740083#1740083
Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
app/models/uploaded_file.rb
... ... @@ -95,7 +95,7 @@ class UploadedFile < Article
95 95 def to_html(options = {})
96 96 article = self
97 97 if image?
98   - lambda do
  98 + proc do
99 99 if article.gallery? && options[:gallery_view]
100 100 images = article.parent.images
101 101 current_index = images.index(article)
... ... @@ -124,7 +124,7 @@ class UploadedFile < Article
124 124  
125 125 end
126 126 else
127   - lambda do
  127 + proc do
128 128 content_tag('ul', content_tag('li', link_to(article.name, article.url, :class => article.css_class_name))) +
129 129 content_tag('p', article.abstract, :class => 'uploaded-file-description')
130 130 end
... ...