Class: Admin::TagsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Admin::TagsController
- Defined in:
- app/controllers/admin/tags_controller.rb
Overview
Copyright © 2008-2013 Michael Dvorkin and contributors.
Fat Free CRM is freely distributable under the terms of MIT license. See MIT-LICENSE file or www.opensource.org/licenses/mit-license.php
Instance Method Summary collapse
-
#confirm ⇒ Object
GET /admin/tags/1/confirm AJAX —————————————————————————-.
-
#create ⇒ Object
POST /admin/tags POST /admin/tags.xml AJAX —————————————————————————-.
-
#destroy ⇒ Object
DELETE /admin/tags/1 DELETE /admin/tags/1.xml AJAX —————————————————————————-.
-
#edit ⇒ Object
GET /admin/tags/1/edit AJAX —————————————————————————-.
-
#index ⇒ Object
GET /admin/tags GET /admin/tags.xml HTML —————————————————————————-.
-
#new ⇒ Object
GET /admin/tags/new GET /admin/tags/new.xml AJAX —————————————————————————-.
-
#update ⇒ Object
PUT /admin/tags/1 PUT /admin/tags/1.xml AJAX —————————————————————————-.
Instance Method Details
#confirm ⇒ Object
GET /admin/tags/1/confirm AJAX
63 64 |
# File 'app/controllers/admin/tags_controller.rb', line 63 def confirm end |
#create ⇒ Object
POST /admin/tags POST /admin/tags.xml AJAX
37 38 39 40 41 |
# File 'app/controllers/admin/tags_controller.rb', line 37 def create @tag.update_attributes(params[:tag]) respond_with(@tag) end |
#destroy ⇒ Object
DELETE /admin/tags/1 DELETE /admin/tags/1.xml AJAX
55 56 57 58 59 |
# File 'app/controllers/admin/tags_controller.rb', line 55 def destroy @tag.destroy respond_with(@tag) end |
#edit ⇒ Object
GET /admin/tags/1/edit AJAX
28 29 30 31 32 |
# File 'app/controllers/admin/tags_controller.rb', line 28 def edit if params[:previous].to_s =~ /(\d+)\z/ @previous = Tag.find_by_id($1) || $1.to_i end end |
#index ⇒ Object
GET /admin/tags GET /admin/tags.xml HTML
14 15 16 17 |
# File 'app/controllers/admin/tags_controller.rb', line 14 def index @tags = Tag.all respond_with(@tags) end |
#new ⇒ Object
GET /admin/tags/new GET /admin/tags/new.xml AJAX
22 23 24 |
# File 'app/controllers/admin/tags_controller.rb', line 22 def new respond_with(@tag) end |
#update ⇒ Object
PUT /admin/tags/1 PUT /admin/tags/1.xml AJAX
46 47 48 49 50 |
# File 'app/controllers/admin/tags_controller.rb', line 46 def update @tag.update_attributes(params[:tag]) respond_with(@tag) end |