Commit 85f72eef11e1cf3e184b3a14e416373ff4ab32fc

Authored by Rodrigo Souto
1 parent 7f92419a

rails3: change file_presenter variable name

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
lib/file_presenter.rb
... ... @@ -7,8 +7,8 @@ class FilePresenter
7 7 # like a Article and have no trouble with that.
8 8 def self.for(f)
9 9 return f if f.is_a? FilePresenter
10   - klass = FilePresenter.subclasses.sort_by {|class_name|
11   - class_name.accepts?(f) || 0
  10 + klass = FilePresenter.subclasses.sort_by {|class_instance|
  11 + class_instance.accepts?(f) || 0
12 12 }.last
13 13 klass.accepts?(f) ? klass.new(f) : f
14 14 end
... ...