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