Class: Action

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/action.rb

Instance Method Summary collapse

Instance Method Details

#to_s(l = nil) ⇒ Object



12
13
14
15
# File 'app/models/action.rb', line 12

def to_s(l=nil)
  haml = Haml::Engine.new(I18n.t('activity.'+self.model_type.to_s.downcase+'.'+(l.nil? ? '' : l.to_s+'.')+self.action.to_s.downcase))
  haml.render( Object.new, {:actor => self.actor, :model => self.model} )
end