Class: Ems::Channel

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

Instance Method Summary collapse

Instance Method Details

#as_json(options = {}) ⇒ Object

Parameters:

  • options (defaults to: {})


30
31
32
# File 'app/models/ems/channel.rb', line 30

def as_json(options={})
  super( options.merge( :include => [ :categories, :articles, :reports, :news ] ) )
end

#should_generate_new_friendly_id?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'app/models/ems/channel.rb', line 8

def should_generate_new_friendly_id?
  new_record?
end