article.rb 249 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 10 11 12 13 14 class Article < ActiveRecord::Base acts_as_taggable acts_as_filesystem acts_as_versioned def profile(reload = false) @profile = nil if reload @profile ||= Profile.find_by_identifier(self.full_path.split(/\//).first) end end