Sha256: bd57fab1be3cb2222f489d9d2e9e849aecd5669f3eeb3f40d9979a7524c92afe
Contents?: true
Size: 572 Bytes
Versions: 100
Compression:
Stored size: 572 Bytes
Contents
require_dependency "ishapi/application_controller" module Ishapi class TagsController < ApplicationController def index authorize! :index, Tag @tags = Tag.all if params[:domain] @site = Site.find_by( :domain => params[:domain], :lang => :en ) @tags = @tags.where( :site => @site ) end end def show begin @tag = Tag.find_by( :name_seo => params[:tagname] ) rescue Mongoid::Errors::DocumentNotFound @tag = Tag.find params[:tagname] end authorize! :show, @tag end end end
Version data entries
100 entries across 100 versions & 1 rubygems