Sha256: ccd64d3661e26748082a04af24f89da15c2f0a1a88a2b561cca6aaa645c1c7ba
Contents?: true
Size: 357 Bytes
Versions: 1
Compression:
Stored size: 357 Bytes
Contents
module MyTags class TagsController < MyTags::ApplicationController respond_to :html, :xml, :json def list respond_with (params[:starts_with].blank? ? Tag.all : Tag.where("name LIKE '#{params[:starts_with]}%'")) end def tag tag = Tag.find_by_name(params[:tag]) @taggables = tag.taggings.map(&:taggable) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
my_tags-1.0.0 | app/controllers/my_tags/tags_controller.rb |