Class: FunctionalSetsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- FunctionalSetsController
- Defined in:
- app/controllers/functional_sets_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #list ⇒ Object
- #new ⇒ Object
- #page_title ⇒ Object
- #update ⇒ Object
Methods included from ApplicationHelper
Instance Method Details
#create ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'app/controllers/functional_sets_controller.rb', line 19 def create @functional_set = FunctionalSet.new(params[:functional_set]) if @functional_set.save flash[:notice] = 'FunctionalSet was successfully created.' redirect_to :action => 'list' else render :action => 'new' end end |
#destroy ⇒ Object
43 44 45 46 |
# File 'app/controllers/functional_sets_controller.rb', line 43 def destroy FunctionalSet.find(params[:id]).destroy redirect_to :action => 'list' end |
#edit ⇒ Object
29 30 31 |
# File 'app/controllers/functional_sets_controller.rb', line 29 def edit @functional_set = FunctionalSet.find(params[:id]) end |
#index ⇒ Object
6 7 8 9 |
# File 'app/controllers/functional_sets_controller.rb', line 6 def index list render :action => 'list' end |
#list ⇒ Object
11 12 13 |
# File 'app/controllers/functional_sets_controller.rb', line 11 def list @functional_set_pages, @functional_sets = paginate :functional_sets, :per_page => 10 end |
#new ⇒ Object
15 16 17 |
# File 'app/controllers/functional_sets_controller.rb', line 15 def new @functional_set = FunctionalSet.new end |
#page_title ⇒ Object
48 49 50 51 52 53 54 |
# File 'app/controllers/functional_sets_controller.rb', line 48 def page_title if ('list' == action_name()) "Functional Sets" else "#{action_name()} Functional Set" end end |
#update ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'app/controllers/functional_sets_controller.rb', line 33 def update @functional_set = FunctionalSet.find(params[:id]) if @functional_set.update_attributes(params[:functional_set]) flash[:notice] = 'FunctionalSet was successfully updated.' redirect_to :action => 'show', :id => @functional_set else render :action => 'edit' end end |