Class: Admin::TagsController
- Inherits:
-
ResourceController
- Object
- ResourceController
- Admin::TagsController
- Defined in:
- app/controllers/admin/tags_controller.rb
Instance Method Summary collapse
Instance Method Details
#cloud ⇒ Object
18 19 20 21 |
# File 'app/controllers/admin/tags_controller.rb', line 18 def cloud @tags = Tag.sized(Tag.with_count).sort response_for :plural end |
#index ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'app/controllers/admin/tags_controller.rb', line 4 def index = params[:query] ? Tag.suggested_by(params[:query]) : Tag.with_count @tags = .sort respond_to do |wants| wants.xml { render :xml => @tags } wants.json { render :json => { 'query' => params[:query], 'suggestions' => @tags.map(&:title) } } wants.any end end |
#show ⇒ Object
14 15 16 |
# File 'app/controllers/admin/tags_controller.rb', line 14 def show @tag = load_model end |