Class: Ems::Tag

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

Instance Method Summary collapse

Instance Method Details

#as_json(options = {}) ⇒ Object

Parameters:

  • options (defaults to: {})


22
23
24
# File 'app/models/ems/tag.rb', line 22

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

#should_generate_new_friendly_id?Boolean

Returns:

  • (Boolean)


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

def should_generate_new_friendly_id?
  new_record?
end