Sha256: 8d1ab7c5d3cc8af0cefddf6a79e99ab7ee33dc4ed4e5d5a3c37f90b130fdea47
Contents?: true
Size: 716 Bytes
Versions: 8
Compression:
Stored size: 716 Bytes
Contents
module MuckContentsHelper # share is an optional share object that can be used to pre populate the form. # options: # html options for form: # :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
8 entries across 8 versions & 1 rubygems