Created
August 15, 2013 22:47
-
-
Save JNajera/6245671 to your computer and use it in GitHub Desktop.
Add refinerycms-page-images to a custom engine of RefineryCMS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // File @ vendor/extensions/products/app/admin/products | |
| <div class='wym_skin_refinery page_part' id='page_image_picker'> | |
| <%= render '/refinery/admin/pages/tabs/images_bar', :f => f %> | |
| <%= render '/refinery/admin/pages/tabs/images_field', :f => f %> | |
| </div> | |
| <% content_for :stylesheets, stylesheet_link_tag('refinery/page-image-picker') %> | |
| <% content_for :javascripts, javascript_include_tag('refinery/page-image-picker') %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rails g refinery:engine products title:string description:text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # File @ vendor/extensions/products/app/models/refinery/products | |
| has_many :image_pages, :as => :item, :order => 'position ASC' | |
| has_many :images, :through => :image_pages, :order => 'position ASC' | |
| has_many_page_images |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment