Class | CategoriesController
In: | app/controllers/categories_controller.rb
Parent: | ApplicationController

### Methods

index show

### Public Instance methods

index()

[Source]

       # File app/controllers/categories_controller.rb, line 2
    2:   def index
    3:     @tree = Tree.find_menu_tree
    4:     @title = "Categorías"
    5:   end

show()

[Source]

        # File app/controllers/categories_controller.rb, line 7
     7:   def show
     8:     @category = Category.find(params[:id])
     9:
    10:     category_tag_ids = Tagging.find_all_by_taggable_type_and_taggable_id('Category', @category.id).collect(&:tag_id)
    11:     if category_tag_ids.length > 0
    12:       conditions = "tag_id in (#{category_tag_ids.join(', ')}) AND NOT (taggable_id=#{@category.id} AND taggable_type='Category')"
    13:     else
    14:       conditions = "1=0"
    15:     end
    16:
    17:     @taggings = paginated_collection_of_tags_for(conditions, :page => params[:page] || 1)
    18:
    19:     # if @taggings.length == 1
    20:     #   redirect_to @taggings.first.taggable and return
    21:     # end
    22:   end

[Validate]