Method: BlogCategory.by_slug
- Defined in:
- app/models/blog_category.rb
.by_slug(value) ⇒ Array
Returns the blog categories matching the specified slug.
48 49 50 |
# File 'app/models/blog_category.rb', line 48 def self.by_slug value self.find :first, :conditions => {:slug => /^#{value}$/i} end |