Sha256: ddf4d599c563610e0b929c34b52315f620994b83f79226ef877f8892282523f6
Contents?: true
Size: 742 Bytes
Versions: 41
Compression:
Stored size: 742 Bytes
Contents
class <%= user_role.capitalize %>::<%= class_name %>Form < Tramway::Core::ApplicationForm properties <%= form_attributes.map{ |a| ":#{a}" }.join(', ') %> def initialize(object) super(object).tap do # Here is the mapping from model attributes to simple_form inputs. # form_properties title: :string, # logo: :file, # description: :ckeditor, # games: :association, # date: :date_picker, # text: :text, # birth_date: { # type: :default, # input_options: { # hint: 'It should be more than 18' # } # } form_properties <%= form_attributes.map{ |attr| "#{attr}: :#{form_type(attr)}"}.join(",\n ") %> end end end
Version data entries
41 entries across 41 versions & 1 rubygems