lib/scaffolding_extensions/meta_model.rb
# Creates a new object, setting the attributes if given.
Creates a new object, setting the attributes if given.
Creates a new object setting the attributes if given .
def scaffold_new_object(attributes, options)
    object = new
    scaffold_set_attributes(object, scaffold_filter_attributes(:new, attributes || {}))
    object.send("#{scaffold_session_value}=", options[:session][scaffold_session_value]) if scaffold_session_value
    object
  end
def scaffold_new_object ( attributes , options ) object = new scaffold_set_attributes ( object , scaffold_filter_attributes ( :new , attributes || { } ) ) object . send ( "#{scaffold_session_value}=" , options [ :session ] [ scaffold_session_value ] ) if scaffold_session_value object end
Creates a new object, setting the attributes if given.
Creates a new object setting the attributes if given .
attributes
<not_specific>
options
<not_specific>