Module: ActiveRecord::Acts::MuckBlogable::InstanceMethods
- Defined in:
- lib/active_record/acts/muck_blogable.rb
Overview
All the methods available to a record that has had acts_as_muck_blog
specified.
Instance Method Summary collapse
Instance Method Details
#after_create ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/active_record/acts/muck_blogable.rb', line 26 def after_create # setup a temp title using information from the parent. title = self.title rescue nil title ||= self.name rescue nil title ||= self.class.to_s title = I18n.t('muck.blogs.blog_title', :title => title) self.blog = Blog.create(:title => title) end |