Class: HelpEngine::HelpPagesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- HelpEngine::HelpPagesController
- Defined in:
- app/controllers/help_engine/help_pages_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /help_pages.
-
#destroy ⇒ Object
DELETE /help_pages/1.
-
#edit ⇒ Object
GET /help_pages/1/edit.
-
#index ⇒ Object
GET /help_pages.
-
#new ⇒ Object
GET /help_pages/new.
-
#show ⇒ Object
GET /help_pages/1.
-
#update ⇒ Object
PATCH/PUT /help_pages/1.
Instance Method Details
#create ⇒ Object
POST /help_pages
26 27 28 29 30 31 32 33 34 |
# File 'app/controllers/help_engine/help_pages_controller.rb', line 26 def create @help_page = HelpPage.new(help_page_params) if @help_page.save redirect_to @help_page, notice: 'Help page was successfully created.' else render :new end end |
#destroy ⇒ Object
DELETE /help_pages/1
46 47 48 49 |
# File 'app/controllers/help_engine/help_pages_controller.rb', line 46 def destroy @help_page.destroy redirect_to help_pages_url, notice: 'Help page was successfully destroyed.' end |
#edit ⇒ Object
GET /help_pages/1/edit
22 23 |
# File 'app/controllers/help_engine/help_pages_controller.rb', line 22 def edit end |
#index ⇒ Object
GET /help_pages
8 9 10 |
# File 'app/controllers/help_engine/help_pages_controller.rb', line 8 def index @help_pages = HelpPage.all end |
#new ⇒ Object
GET /help_pages/new
17 18 19 |
# File 'app/controllers/help_engine/help_pages_controller.rb', line 17 def new @help_page = HelpPage.new end |
#show ⇒ Object
GET /help_pages/1
13 14 |
# File 'app/controllers/help_engine/help_pages_controller.rb', line 13 def show end |
#update ⇒ Object
PATCH/PUT /help_pages/1
37 38 39 40 41 42 43 |
# File 'app/controllers/help_engine/help_pages_controller.rb', line 37 def update if @help_page.update(help_page_params) redirect_to @help_page, notice: 'Help page was successfully updated.' else render :edit end end |