Class: Seo::SeoPagesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Seo::SeoPagesController
- Defined in:
- app/controllers/seo/seo_pages_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /seo_pages.
-
#destroy ⇒ Object
DELETE /seo_pages/1.
-
#edit ⇒ Object
GET /seo_pages/1/edit.
-
#index ⇒ Object
GET /seo_pages.
-
#new ⇒ Object
GET /seo_pages/new.
-
#show ⇒ Object
GET /seo_pages/1.
-
#update ⇒ Object
PATCH/PUT /seo_pages/1.
Instance Method Details
#create ⇒ Object
POST /seo_pages
28 29 30 31 32 33 34 35 36 |
# File 'app/controllers/seo/seo_pages_controller.rb', line 28 def create @seo_page = SeoPage.new(seo_page_params) if @seo_page.save redirect_to @seo_page, notice: 'Seo page was successfully created.' else render action: 'new' end end |
#destroy ⇒ Object
DELETE /seo_pages/1
48 49 50 51 |
# File 'app/controllers/seo/seo_pages_controller.rb', line 48 def destroy @seo_page.destroy redirect_to seo_pages_url, notice: 'Seo page was successfully destroyed.' end |
#edit ⇒ Object
GET /seo_pages/1/edit
24 25 |
# File 'app/controllers/seo/seo_pages_controller.rb', line 24 def edit end |
#index ⇒ Object
GET /seo_pages
8 9 10 11 12 |
# File 'app/controllers/seo/seo_pages_controller.rb', line 8 def index # Display defaults in the index page if needed. @seo_defaults = SeoPageDefault.first @seo_pages = SeoPage.all end |
#new ⇒ Object
GET /seo_pages/new
19 20 21 |
# File 'app/controllers/seo/seo_pages_controller.rb', line 19 def new @seo_page = SeoPage.new end |
#show ⇒ Object
GET /seo_pages/1
15 16 |
# File 'app/controllers/seo/seo_pages_controller.rb', line 15 def show end |
#update ⇒ Object
PATCH/PUT /seo_pages/1
39 40 41 42 43 44 45 |
# File 'app/controllers/seo/seo_pages_controller.rb', line 39 def update if @seo_page.update(seo_page_params) redirect_to @seo_page, notice: 'Seo page was successfully updated.' else render action: 'edit' end end |