Skip to content

Commit

Permalink
Allow setting the class of the Actor without overriding
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Mar 30, 2016
1 parent 430cf42 commit 22f7068
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ module CurationConcerns::CurationConcernController
with_themed_layout '1_column'
helper CurationConcerns::AbilityHelper

class_attribute :_curation_concern_type, :show_presenter
class_attribute :_curation_concern_type, :show_presenter, :actor_class
self.show_presenter = CurationConcerns::WorkShowPresenter
self.actor_class = CurationConcerns::CurationConcern
attr_accessor :curation_concern
helper_method :curation_concern
end
Expand Down Expand Up @@ -115,7 +116,7 @@ def build_form
end

def actor
@actor ||= CurationConcerns::CurationConcern.actor(curation_concern, current_user, attributes_for_actor)
@actor ||= actor_class.actor(curation_concern, current_user, attributes_for_actor)
end

def presenter
Expand Down

0 comments on commit 22f7068

Please sign in to comment.