Sha256: fe5b707c4a87f9c9af28f41895c0446b5f5d6e35455046b7af0d112bb79fa241
Contents?: true
Size: 1005 Bytes
Versions: 3
Compression:
Stored size: 1005 Bytes
Contents
dir = File.dirname(__FILE__) require File.join(dir, 'simple_form', 'base') require File.join(dir, 'simple_form', 'dsl') require File.join(dir, 'simple_form', 'errors') require File.join(dir, 'simple_form', 'notifier') class SimpleForm extend SimpleForm::DSL ACCESSORS = [ :form_attributes, :form_validatable, :form_subject, :form_attachments, :form_recipients, :form_sender, :form_captcha, :form_headers, :form_appendable ] DEFAULT_MESSAGES = { :blank => "can't be blank", :invalid => "is invalid" } class_inheritable_reader *ACCESSORS protected *ACCESSORS # Initialize arrays and hashes # write_inheritable_array :form_captcha, [] write_inheritable_array :form_appendable, [] write_inheritable_array :form_attributes, [] write_inheritable_array :form_attachments, [] write_inheritable_hash :form_validatable, {} headers({}) sender {|c| c.email } subject{|c| c.class.human_name } end SimpleForm::Notifier.template_root = File.join(dir, '..', 'views')
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
josevalim-simple_form-0.2.0 | lib/simple_form.rb |
josevalim-simple_form-0.2.1 | lib/simple_form.rb |
josevalim-simple_form-0.3.1 | lib/simple_form.rb |