Class: SimplePages::PagesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- SimplePages::PagesController
- Defined in:
- app/controllers/simple_pages/pages_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
30 31 32 33 |
# File 'app/controllers/simple_pages/pages_controller.rb', line 30 def create @page.save respond_with @page end |
#destroy ⇒ Object
40 41 42 43 |
# File 'app/controllers/simple_pages/pages_controller.rb', line 40 def destroy @page.destroy respond_with @page end |
#edit ⇒ Object
27 28 |
# File 'app/controllers/simple_pages/pages_controller.rb', line 27 def edit end |
#index ⇒ Object
13 14 15 16 |
# File 'app/controllers/simple_pages/pages_controller.rb', line 13 def index @pages = @pages.paginate respond_with @pages end |
#new ⇒ Object
22 23 24 25 |
# File 'app/controllers/simple_pages/pages_controller.rb', line 22 def new @page. = session_user respond_with @page end |
#show ⇒ Object
18 19 20 |
# File 'app/controllers/simple_pages/pages_controller.rb', line 18 def show respond_with @page end |
#update ⇒ Object
35 36 37 38 |
# File 'app/controllers/simple_pages/pages_controller.rb', line 35 def update @page.update_attributes page_params respond_with @page end |