Class: Ems::Category

Inherits:
ActiveRecord::Base
  • Object
show all
Extended by:
FriendlyId
Defined in:
app/models/ems/category.rb

Instance Method Summary collapse

Instance Method Details

#as_json(options = {}) ⇒ Object

Parameters:

  • options (defaults to: {})


26
27
28
# File 'app/models/ems/category.rb', line 26

def as_json(options={})
  super( options.merge( :include => [ :channels ] ) )
end

#should_generate_new_friendly_id?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'app/models/ems/category.rb', line 9

def should_generate_new_friendly_id?
  new_record?
end