Sha256: 5c404c4b5babfc2eb82d760e3841a579d78d649a486e9ee0428b58e7f5b362ac
Contents?: true
Size: 783 Bytes
Versions: 3
Compression:
Stored size: 783 Bytes
Contents
module MuckContentsHelper # share is an optional share object that can be used to pre populate the form. # content: Optional content object to be edited. # options: html options for form. For example: # :html => {:id => 'a form'} def content_form(content = nil, options = {}, &block) content ||= Content.new options[:html] = {} if options[:html].nil? raw_block_to_partial('contents/form', options.merge(:content => content), &block) end # content uses friendly_id but we want the param in the form to use the number id def get_content_form_url(content, parent) if content.new_record? contents_path(make_muck_parent_params(parent)) else content_path(content.id, make_muck_parent_params(parent)) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
muck-contents-0.1.11 | app/helpers/muck_contents_helper.rb |
muck-contents-0.1.10 | app/helpers/muck_contents_helper.rb |
muck-contents-0.1.9 | app/helpers/muck_contents_helper.rb |