Skip to content

Commit

Permalink
class option is now passed as a string instead of a constant
Browse files Browse the repository at this point in the history
  • Loading branch information
blaknite committed May 18, 2016
1 parent d4a5d70 commit 723ba67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/blush/has_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def has_presenter(accessor_name = {}, options = nil)
self.blush_options = options

define_method(accessor_name || Blush.config.accessor_name) do
@presenter ||= (self.blush_options[:class] || "#{self.model_name}Presenter".constantize).new(self)
@presenter ||= (self.blush_options[:class] || "#{self.model_name}Presenter").constantize.new(self)
end

define_method(self.blush_options[:helper_name] || Blush.config.helper_name) do |method, *args, &block|
Expand Down

0 comments on commit 723ba67

Please sign in to comment.