diff options
Diffstat (limited to 'lib/page_extensions.rb')
-rw-r--r-- | lib/page_extensions.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/page_extensions.rb b/lib/page_extensions.rb new file mode 100644 index 0000000..973c177 --- /dev/null +++ b/lib/page_extensions.rb @@ -0,0 +1,17 @@ +module Refinery + module Banners + module Extensions + module Page + module ClassMethods + def add_banners_relationship + has_and_belongs_to_many :banners, :class_name => '::Refinery::Banners::Banner', :join_table => 'refinery_banners_pages' + end + end + + def self.included(base) + base.extend(ClassMethods).add_banners_relationship + end + end + end + end +end
\ No newline at end of file |