Module: Worthwhile::CurationConcernController
- Extended by:
- ActiveSupport::Concern
- Includes:
- Blacklight::Catalog::SearchContext, WithoutNamespace
- Defined in:
- app/controllers/concerns/worthwhile/curation_concern_controller.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#actor ⇒ Object
writeonly
Sets the attribute actor.
Instance Method Summary collapse
- #contributor_agreement ⇒ Object
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #new ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Attribute Details
#actor=(value) ⇒ Object
Sets the attribute actor
73 74 75 |
# File 'app/controllers/concerns/worthwhile/curation_concern_controller.rb', line 73 def actor=(value) @actor = value end |
Instance Method Details
#contributor_agreement ⇒ Object
30 31 32 |
# File 'app/controllers/concerns/worthwhile/curation_concern_controller.rb', line 30 def contributor_agreement @contributor_agreement ||= Worthwhile::ContributorAgreement.new(curation_concern, current_user, params) end |
#create ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 |
# File 'app/controllers/concerns/worthwhile/curation_concern_controller.rb', line 38 def create return unless verify_acceptance_of_user_agreement! if actor.create after_create_response else setup_form respond_with([:curation_concern, curation_concern]) do |wants| wants.html { render 'new', status: :unprocessable_entity } end end end |
#destroy ⇒ Object
67 68 69 70 71 |
# File 'app/controllers/concerns/worthwhile/curation_concern_controller.rb', line 67 def destroy title = curation_concern.to_s curation_concern.destroy after_destroy_response(title) end |
#edit ⇒ Object
53 54 |
# File 'app/controllers/concerns/worthwhile/curation_concern_controller.rb', line 53 def edit end |
#new ⇒ Object
35 36 |
# File 'app/controllers/concerns/worthwhile/curation_concern_controller.rb', line 35 def new end |
#show ⇒ Object
50 51 |
# File 'app/controllers/concerns/worthwhile/curation_concern_controller.rb', line 50 def show end |
#update ⇒ Object
56 57 58 59 60 61 62 63 64 65 |
# File 'app/controllers/concerns/worthwhile/curation_concern_controller.rb', line 56 def update if actor.update after_update_response else setup_form respond_with([:curation_concern, curation_concern]) do |wants| wants.html { render 'edit', status: :unprocessable_entity } end end end |