Closed fusepilot closed 10 years ago
This allows you to specify partial overrides based on attribute or association name for the whole system and not only on specific models.
I needed to customize an attribute's partial with a file_field input on more than one model. E.g.,
class Product < ActiveRecord::Base mount_uploader :image, ImageUploader end class Post < ActiveRecord::Base mount_uploader :image, ImageUploader end
I can now add a partial to app/views/upmin/partials/attributes/_image.html.haml to override the attribute's partial for both models in Upmin.
app/views/upmin/partials/attributes/_image.html.haml
Thanks Michael, would you mind documenting this in the wiki please? https://github.com/upmin/upmin-admin-ruby/wiki/Customizing-Views
This allows you to specify partial overrides based on attribute or association name for the whole system and not only on specific models.
I needed to customize an attribute's partial with a file_field input on more than one model. E.g.,
I can now add a partial to
app/views/upmin/partials/attributes/_image.html.haml
to override the attribute's partial for both models in Upmin.