Created
December 10, 2012 19:47
-
-
Save rbrancher/4252859 to your computer and use it in GitHub Desktop.
helper
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
def mmagick_container(model, relation, media_types = {upload: true, reference: false}, options = {}) | |
data = data_attributes(model, relation, options) | |
id = "#{model.class.to_s.downcase}-#{relation.to_s}" | |
classes = "mmagick-wrapper #{relation.to_s}" | |
content_tag 'div', id: id, class: classes, data: data do | |
if block_given? | |
yield | |
else | |
render '/wrapper_content', partial_attributes(model, relation, media_types, options) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment