Class: Locomotive::ContentTypesController
Instance Method Summary
collapse
#require_ssl
#current_site_public_url, #public_page_url, #switch_to_site_url
#sections
#back_to_default_site_locale, #current_content_locale, #localized?, #set_back_office_locale, #set_current_content_locale, #setup_i18n_fallbacks
Instance Method Details
#create ⇒ Object
17
18
19
20
|
# File 'app/controllers/locomotive/content_types_controller.rb', line 17
def create
@content_type = current_site.content_types.create(params[:content_type])
respond_with @content_type, location: edit_content_type_path(@content_type._id)
end
|
#destroy ⇒ Object
33
34
35
36
37
|
# File 'app/controllers/locomotive/content_types_controller.rb', line 33
def destroy
@content_type = current_site.content_types.find(params[:id])
@content_type.destroy
respond_with @content_type, location: pages_path
end
|
#edit ⇒ Object
22
23
24
25
|
# File 'app/controllers/locomotive/content_types_controller.rb', line 22
def edit
@content_type = current_site.content_types.find(params[:id])
respond_with @content_type
end
|
#new ⇒ Object
12
13
14
15
|
# File 'app/controllers/locomotive/content_types_controller.rb', line 12
def new
@content_type = current_site.content_types.new
respond_with @content_type
end
|
#update ⇒ Object
27
28
29
30
31
|
# File 'app/controllers/locomotive/content_types_controller.rb', line 27
def update
@content_type = current_site.content_types.find(params[:id])
@content_type.update_attributes(params[:content_type])
respond_with @content_type, location: edit_content_type_path(@content_type._id)
end
|