Class: Admin::TeamMembersController
- Inherits:
-
AdminController
- Object
- AdminController
- Admin::TeamMembersController
- Defined in:
- app/controllers/c/admin/team_members_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #dashboard ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #sort ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
17 18 19 20 21 22 23 |
# File 'app/controllers/c/admin/team_members_controller.rb', line 17 def create if @team_member.save redirect_to team_members_path, notice: 'Team Member created' else render :new end end |
#dashboard ⇒ Object
33 |
# File 'app/controllers/c/admin/team_members_controller.rb', line 33 def dashboard; end |
#destroy ⇒ Object
35 36 37 38 39 40 41 |
# File 'app/controllers/c/admin/team_members_controller.rb', line 35 def destroy @team_member.destroy respond_to do |format| format.js format.html { redirect_to team_members_path } end end |
#edit ⇒ Object
15 |
# File 'app/controllers/c/admin/team_members_controller.rb', line 15 def edit; end |
#index ⇒ Object
9 10 11 |
# File 'app/controllers/c/admin/team_members_controller.rb', line 9 def index @team_members end |
#new ⇒ Object
13 |
# File 'app/controllers/c/admin/team_members_controller.rb', line 13 def new; end |
#sort ⇒ Object
43 44 45 46 47 48 49 |
# File 'app/controllers/c/admin/team_members_controller.rb', line 43 def sort @team_members = C::TeamMember.all @team_members.update_order(params[:team_member]) respond_to do |format| format.js { head :ok, content_type: 'text/html' } end end |
#update ⇒ Object
25 26 27 28 29 30 31 |
# File 'app/controllers/c/admin/team_members_controller.rb', line 25 def update if @team_member.update(team_member_params) redirect_to team_members_path, notice: 'Team Member updated' else render :edit end end |