Sha256: 75180c8a7f0f87d5674d2d7f3d6b6b290cfbd5ac812c30c20abe7ba22e19c939
Contents?: true
Size: 1021 Bytes
Versions: 9
Compression:
Stored size: 1021 Bytes
Contents
Description: Generates a form per usual but with fields_for for the has_many and belongs_to associations that are "accepted_nested_attributes". If the fields are not accepted nested attributes, then they are selectable options, multi-select for has_many and single select for belongs_to. 'has_attached_file' will trigger the file_field input and create a multipart form. Example: rails generate skizmo:form Foo With Foo.rb (model like this): class Foo < ActiveRecord::Base has_many :bars belongs_to :baz accepts_nested_attributes_for :bars accepts_nested_attributes_for :baz has_attached_file :image end This will create: public/javascripts/jquery.add_remove_links.js app/helpers/add_remove_links_helper.rb app/helpers/foo_setup_helper.rb app/views/foos/new.html.erb app/views/foos/edit.html.erb app/views/foos/_form.html.erb app/views/foos/_bar_fields.html.erb app/views/foos/_baz_fields.html.erb
Version data entries
9 entries across 9 versions & 1 rubygems