Class: Flag

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/flag.rb

Instance Method Summary collapse

Instance Method Details

#callback_flaggableObject

Pings the ‘after_flagged’ callback in the content model, if it exists.



28
29
30
# File 'lib/flag.rb', line 28

def callback_flaggable
  flaggable.callback :after_flagged
end

#set_owner_idObject



33
34
35
# File 'lib/flag.rb', line 33

def set_owner_id
  self.flaggable_user_id = flaggable.user_id
end