Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/refinery/blog/blog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class BlogController < ::ApplicationController
protected

def find_all_blog_categories
@categories = Refinery::Blog::Category.translated
@categories = Refinery::Blog::Category.all
end

def find_blog_post
Expand Down
6 changes: 1 addition & 5 deletions app/models/refinery/blog/category.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Blog
class Category < ActiveRecord::Base
extend Mobility
translates :title, :slug

extend FriendlyId
friendly_id :title, :use => [:mobility, :slugged]

Expand All @@ -16,10 +16,6 @@ def self.by_title(title)
joins(:translations).find_by(title: title)
end

def self.translated
translations.in_locale(Mobility.locale)
end

def post_count
posts.live.with_mobility.count
end
Expand Down