categories_controller.rb revision 28c312c686f25fd40963983fa3b725469eac682a
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainenclass CategoriesController < InheritedResources::Base
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen @ontology = Ontology.find(params[:ontology_id])
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen @categories = Kaminari.paginate_array(@ontology.categories).page(params[:page])
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen @ontologies = Ontology.find(:all, :joins => :categories, :conditions => "categories.id IN (#{categories *","})")