Sha256: 96aace3259735c8d036effb9d77e99ca08f2837f77fe4f5b096a6bdf36f238c8

Contents?: true

Size: 531 Bytes

Versions: 10

Compression:

Stored size: 531 Bytes

Contents

class Admin::TagsController < Admin::ResourceController
  helper :taggable
  
  def index
    tags = params[:query] ? Tag.suggested_by(params[:query]) : Tag.with_count
    @tags = 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
  
  def show
    @tag = load_model
  end
  
  def cloud
    @tags = Tag.sized(Tag.with_count).sort
    response_for :plural
  end
    
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
radiant-taggable-extension-2.0.5 app/controllers/admin/tags_controller.rb
radiant-taggable-extension-2.0.4 app/controllers/admin/tags_controller.rb
radiant-taggable-extension-2.0.3 app/controllers/admin/tags_controller.rb
radiant-taggable-extension-2.0.2 app/controllers/admin/tags_controller.rb
radiant-taggable-extension-2.0.1 app/controllers/admin/tags_controller.rb
radiant-taggable-extension-2.0.0 app/controllers/admin/tags_controller.rb
radiant-taggable-extension-2.0.0.rc2 app/controllers/admin/tags_controller.rb
radiant-taggable-extension-2.0.0.rc1 app/controllers/admin/tags_controller.rb
radiant-taggable-extension-1.2.5 app/controllers/admin/tags_controller.rb
radiant-taggable-extension-1.2.4 app/controllers/admin/tags_controller.rb