Sha256: 97044b89fc72a74c92f22998e5757c2f7be6c271ae63cd69676a4ae9201d03b9
Contents?: true
Size: 474 Bytes
Versions: 6
Compression:
Stored size: 474 Bytes
Contents
require 'active_support/concern' module SimplePages module Models module PageOwner extend ActiveSupport::Concern included do attr_reader :owner attr_accessible :owner belongs_to :author, polymorphic: true end module ClassMethods end def owner=(attrs) owner_attrs = attrs.split(',') self.author_type = owner_attrs.first self.author_id = owner_attrs.last end end end end
Version data entries
6 entries across 6 versions & 1 rubygems