Class: Manage::TrackableTagsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Manage::TrackableTagsController
- Defined in:
- app/controllers/manage/trackable_tags_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /manage/trackable_tags.
-
#destroy ⇒ Object
DELETE /manage/trackable_tags/1.
-
#edit ⇒ Object
GET /manage/trackable_tags/1/edit.
-
#index ⇒ Object
GET /manage/trackable_tags.
-
#new ⇒ Object
GET /manage/trackable_tags/new.
-
#show ⇒ Object
GET /manage/trackable_tags/1.
-
#update ⇒ Object
PATCH/PUT /manage/trackable_tags/1.
Methods inherited from ApplicationController
#json_request?, #limit_write_access_to_admins, #logged_in, #require_admin_or_limited_admin, #require_admin_or_limited_admin_or_event_tracking, #response_view_or_errors
Instance Method Details
#create ⇒ Object
POST /manage/trackable_tags
31 32 33 34 35 36 37 38 39 40 |
# File 'app/controllers/manage/trackable_tags_controller.rb', line 31 def create @trackable_tag = TrackableTag.new(trackable_tag_params) if @trackable_tag.save flash[:notice] = 'Trackable tag was successfully created.' respond_with(:manage, @trackable_tag) else response_view_or_errors :new, @trackable_tag end end |
#destroy ⇒ Object
DELETE /manage/trackable_tags/1
53 54 55 56 57 |
# File 'app/controllers/manage/trackable_tags_controller.rb', line 53 def destroy @trackable_tag.destroy flash[:notice] = 'Trackable tag was successfully destroyed.' respond_with(:manage, @trackable_tag) end |
#edit ⇒ Object
GET /manage/trackable_tags/1/edit
27 28 |
# File 'app/controllers/manage/trackable_tags_controller.rb', line 27 def edit end |
#index ⇒ Object
GET /manage/trackable_tags
10 11 12 13 |
# File 'app/controllers/manage/trackable_tags_controller.rb', line 10 def index @trackable_tags = TrackableTag.all.order("name ASC") respond_with(:manage, @trackable_tags) end |
#new ⇒ Object
GET /manage/trackable_tags/new
21 22 23 24 |
# File 'app/controllers/manage/trackable_tags_controller.rb', line 21 def new @trackable_tag = TrackableTag.new respond_with(:manage, @questionnaire) end |
#show ⇒ Object
GET /manage/trackable_tags/1
16 17 18 |
# File 'app/controllers/manage/trackable_tags_controller.rb', line 16 def show respond_with(:manage, @trackable_tag) end |
#update ⇒ Object
PATCH/PUT /manage/trackable_tags/1
43 44 45 46 47 48 49 50 |
# File 'app/controllers/manage/trackable_tags_controller.rb', line 43 def update if @trackable_tag.update(trackable_tag_params) flash[:notice] = 'Trackable tag was successfully updated.' respond_with(:manage, @trackable_tag) else response_view_or_errors :edit, @trackable_tag end end |