Class: Refinery::Blog::Category
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Refinery::Blog::Category
- Extended by:
- FriendlyId
- Defined in:
- app/models/refinery/blog/category.rb
Defined Under Namespace
Classes: Translation
Instance Attribute Summary collapse
-
#locale ⇒ Object
Returns the value of attribute locale.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#locale ⇒ Object
Returns the value of attribute locale.
16 17 18 |
# File 'app/models/refinery/blog/category.rb', line 16 def locale @locale end |
Class Method Details
.translated ⇒ Object
22 23 24 |
# File 'app/models/refinery/blog/category.rb', line 22 def self.translated with_translations(::Globalize.locale) end |
Instance Method Details
#post_count ⇒ Object
26 27 28 |
# File 'app/models/refinery/blog/category.rb', line 26 def post_count posts.live.with_globalize.count end |