Class: Worthwhile::ClassifyConcernsController

Inherits:
ApplicationController show all
Includes:
ThemedLayoutController
Defined in:
app/controllers/worthwhile/classify_concerns_controller.rb

Instance Method Summary collapse

Methods included from ThemedLayoutController

#show_site_actions?, #show_site_search?

Instance Method Details

#classify_concernObject



11
12
13
# File 'app/controllers/worthwhile/classify_concerns_controller.rb', line 11

def classify_concern
  @classify_concern
end

#createObject



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'app/controllers/worthwhile/classify_concerns_controller.rb', line 20

def create
  classify_concern.attributes = params[:classify_concern]
  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



16
17
18
# File 'app/controllers/worthwhile/classify_concerns_controller.rb', line 16

def new
  respond_with(classify_concern)
end