Commit eaf3e2fc9f4ab3ce5921a4e551f58d412a2ffe10
1 parent
78acd19c
Exists in
master
and in
29 other branches
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,7 +95,7 @@ class UploadedFile < Article | ||
95 | def to_html(options = {}) | 95 | def to_html(options = {}) |
96 | article = self | 96 | article = self |
97 | if image? | 97 | if image? |
98 | - lambda do | 98 | + proc do |
99 | if article.gallery? && options[:gallery_view] | 99 | if article.gallery? && options[:gallery_view] |
100 | images = article.parent.images | 100 | images = article.parent.images |
101 | current_index = images.index(article) | 101 | current_index = images.index(article) |
@@ -124,7 +124,7 @@ class UploadedFile < Article | @@ -124,7 +124,7 @@ class UploadedFile < Article | ||
124 | 124 | ||
125 | end | 125 | end |
126 | else | 126 | else |
127 | - lambda do | 127 | + proc do |
128 | content_tag('ul', content_tag('li', link_to(article.name, article.url, :class => article.css_class_name))) + | 128 | content_tag('ul', content_tag('li', link_to(article.name, article.url, :class => article.css_class_name))) + |
129 | content_tag('p', article.abstract, :class => 'uploaded-file-description') | 129 | content_tag('p', article.abstract, :class => 'uploaded-file-description') |
130 | end | 130 | end |