Class: Admin::TagsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Admin::TagsController
- Defined in:
- app/controllers/admin/tags_controller.rb
Overview
Fat Free CRM Copyright © 2008-2011 by Michael Dvorkin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <www.gnu.org/licenses/>.
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
74 75 |
# File 'app/controllers/admin/tags_controller.rb', line 74 def confirm end |
#create ⇒ Object
POST /admin/tags POST /admin/tags.xml AJAX
48 49 50 51 52 |
# File 'app/controllers/admin/tags_controller.rb', line 48 def create @tag.update_attributes(params[:tag]) respond_with(@tag) end |
#destroy ⇒ Object
DELETE /admin/tags/1 DELETE /admin/tags/1.xml AJAX
66 67 68 69 70 |
# File 'app/controllers/admin/tags_controller.rb', line 66 def destroy @tag.destroy respond_with(@tag) end |
#edit ⇒ Object
GET /admin/tags/1/edit AJAX
39 40 41 42 43 |
# File 'app/controllers/admin/tags_controller.rb', line 39 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
26 27 28 |
# File 'app/controllers/admin/tags_controller.rb', line 26 def index respond_with(@tags) end |
#new ⇒ Object
GET /admin/tags/new GET /admin/tags/new.xml AJAX
33 34 35 |
# File 'app/controllers/admin/tags_controller.rb', line 33 def new respond_with(@tag) end |
#update ⇒ Object
PUT /admin/tags/1 PUT /admin/tags/1.xml AJAX
57 58 59 60 61 |
# File 'app/controllers/admin/tags_controller.rb', line 57 def update @tag.update_attributes(params[:tag]) respond_with(@tag) end |