Sha256: 96e73a31a58005641ffecd81dbecac419e696f5ae739ae8eb2495b11681c6658
Contents?: true
Size: 1.01 KB
Versions: 9
Compression:
Stored size: 1.01 KB
Contents
module Gluttonberg module Admin class MainController < Gluttonberg::Admin::BaseController unloadable def index @categories_count = ActsAsTaggableOn::Tag.find_by_sql(%{ select count(DISTINCT tags.id) as category_count from tags inner join taggings on tags.id = taggings.tag_id where context = 'article_category' }).first.category_count @tags_counts = ActsAsTaggableOn::Tag.count - @categories_count.to_i if Blog.table_exists? @blog = Blog.first end if Comment.table_exists? @comments = Comment.all_pending.where({:commentable_type => "Gluttonberg::Article" , :moderation_required => true }).order("created_at DESC").limit(5) @article = Article.new @article_localization = ArticleLocalization.new(:article => @article , :locale_id => Locale.first_default.id) @blogs = Gluttonberg::Blog.all @authors = User.all end end def show end end end end
Version data entries
9 entries across 9 versions & 1 rubygems