Class: CurationConcern::LinkedResourcesController
Instance Method Summary
collapse
#parent
#authorize_curation_concern!, #contributor_agreement
Instance Method Details
#attach_action_breadcrumb ⇒ Object
38
39
40
41
|
# File 'app/controllers/curation_concern/linked_resources_controller.rb', line 38
def attach_action_breadcrumb
add_breadcrumb "#{parent.human_readable_type}", polymorphic_path([:curation_concern, parent])
super
end
|
#create ⇒ Object
16
17
18
19
20
21
22
23
24
25
|
# File 'app/controllers/curation_concern/linked_resources_controller.rb', line 16
def create
curation_concern.batch = parent
if actor.create
respond_with([:curation_concern, parent])
else
respond_with([:curation_concern, curation_concern]) { |wants|
wants.html { render 'new', status: :unprocessable_entity }
}
end
end
|
#new ⇒ Object
12
13
14
|
# File 'app/controllers/curation_concern/linked_resources_controller.rb', line 12
def new
respond_with(curation_concern)
end
|