Class: GroupsController
- Inherits:
-
InheritedResources::Base
- Object
- InheritedResources::Base
- GroupsController
- Defined in:
- app/controllers/groups_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'app/controllers/groups_controller.rb', line 25 def create create! do |success, failure| success.html { self.current_subject = @group redirect_to :home } end end |
#destroy ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'app/controllers/groups_controller.rb', line 34 def destroy destroy! do |success, failure| success.html { self.current_subject = current_user redirect_to :home } end end |
#index ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/groups_controller.rb', line 12 def index @groups = Group.most(params[:most]). alphabetic. letter(params[:letter]). name_search(params[:search]). tagged_with(params[:tag]). page(params[:page]).per(10) end |
#show ⇒ Object
22 23 |
# File 'app/controllers/groups_controller.rb', line 22 def show end |