Class: ClassifyConcernsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/classify_concerns_controller.rb

Instance Method Summary collapse

Instance Method Details

#classify_concernObject



9
10
11
# File 'app/controllers/classify_concerns_controller.rb', line 9

def classify_concern
  @classify_concern ||= ClassifyConcern.new(params[:classify_concern])
end

#createObject



18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'app/controllers/classify_concerns_controller.rb', line 18

def create
  if classify_concern.valid?
    respond_with(classify_concern) do |wants|
      wants.html do
        redirect_to new_polymorphic_path(
          [:curation_concern, classify_concern.curation_concern_class]
        )
      end
    end
  else
    respond_with(classify_concern)
  end
end

#newObject



14
15
16
# File 'app/controllers/classify_concerns_controller.rb', line 14

def new
  respond_with(classify_concern)
end