Skip to content
Newer
Older
100644 637 lines (482 sloc) 25.8 KB
420b4ce @justinfrench sick of updating the README with every version bump :)
authored
1 h1. Formtastic
dcf8beb Initial Commit
Justin French authored
2
3 Formtastic is a Rails FormBuilder DSL (with some other goodies) to make it far easier to create beautiful, semantically rich, syntactically awesome, readily stylable and wonderfully accessible HTML forms in your Rails applications.
4
cd0a1ba @justinfrench pledgie image URL is a redirect, so here's the real URL
authored
5 <a href='http://www.pledgie.com/campaigns/2178'><img alt='Click here to lend your support to: formtastic and make a donation at www.pledgie.com !' src='http://pledgie.com/campaigns/2178.png?skin_name=chrome' border='0' /></a>
1bbe8ea @justinfrench add the pledgie badge back in, GH don't show them any more?
authored
6
dc5857b @justinfrench moved compatibility note in README further up
authored
7
c462c09 @justinfrench update readme, make docs clearer, remove google group, etc
authored
8 h2. Documentation & Support
9
10 * "Documentation is available on rdoc.info":http://rdoc.info/projects/justinfrench/formtastic
11 * "We track issues & bugs on GitHub":http://github.com/justinfrench/formtastic/issues
12 * "We have a wiki on GitHub":http://github.com/justinfrench/formtastic/wiki
13 * "StackOverflow can help":http://stackoverflow.com/questions/tagged/formtastic
14 * "Follow @formtastic on Twitter for news & updates":http://twitter.com/formtastic
15
16
dc5857b @justinfrench moved compatibility note in README further up
authored
17 h2. Compatibility
18
a69e7b8 @justinfrench note that 2.1.x is required for Rails 3.2 in README, ref #785
authored
19 * Formtastic 2.1.x is Rails 3.x compatible
20 * Formtastic 2.0.x is Rails 3.0.x and 3.1.x compatible only
22a9af1 @justinfrench prep README for 2.0
authored
21 * Formtastic 1.x is compatible with both Rails 2 and 3, and is being maintained for bug fixes in the the "1.2-stable branch":https://github.com/justinfrench/formtastic/tree/1.2-stable. View the README in that branch for installation instructions, etc.
dc5857b @justinfrench moved compatibility note in README further up
authored
22 * Formtastic, much like Rails, is very ActiveRecord-centric. Many are successfully using other ActiveModel-like ORMs and objects (DataMapper, MongoMapper, Mongoid, Authlogic, Devise...) but we're not guaranteeing full compatibility at this stage. Patches are welcome!
23
24
09d957d textilized the README so that it looks pretty pretty on GitHub
Justin French authored
25 h2. The Story
dcf8beb Initial Commit
Justin French authored
26
2d4a72b @justinfrench big update to the README
authored
27 One day, I finally had enough, so I opened up my text editor, and wrote a DSL for how I'd like to author forms:
dcf8beb Initial Commit
Justin French authored
28
09d957d textilized the README so that it looks pretty pretty on GitHub
Justin French authored
29 <pre>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
30 <%= semantic_form_for @article do |f| %>
31
32 <%= f.inputs :name => "Basic" do %>
33 <%= f.input :title %>
34 <%= f.input :body %>
35 <%= f.input :section %>
36 <%= f.input :publication_state, :as => :radio %>
37 <%= f.input :category %>
38 <%= f.input :allow_comments, :label => "Allow commenting on this article" %>
353618e @markmansour Extending Formtastic can be done by overriding the semantic_form_buil…
markmansour authored
39 <% end %>
40
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
41 <%= f.inputs :name => "Advanced" do %>
42 <%= f.input :keywords, :required => false, :hint => "Example: ruby, rails, forms" %>
43 <%= f.input :extract, :required => false %>
44 <%= f.input :description, :required => false %>
45 <%= f.input :url_title, :required => false %>
7e3874a @justinfrench trying to fix README formatting of <'s at the start of lines
authored
46 <% end %>
47
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
48 <%= f.inputs :name => "Author", :for => :author do |author_form| %>
05ae54d @josevalim Fixed nested attributes example in README
josevalim authored
49 <%= author_form.input :first_name %>
50 <%= author_form.input :last_name %>
9997ce6 @josevalim Added more information about inputs :for in README.
josevalim authored
51 <% end %>
52
a429c6a @justinfrench change README to use actions instead of buttons
authored
53 <%= f.actions do %>
54 <%= f.action :submit, :as => :button %>
55 <%= f.action :cancel, :as => :link %>
7e3874a @justinfrench trying to fix README formatting of <'s at the start of lines
authored
56 <% end %>
09d957d textilized the README so that it looks pretty pretty on GitHub
Justin French authored
57
dcf8beb Initial Commit
Justin French authored
58 <% end %>
09d957d textilized the README so that it looks pretty pretty on GitHub
Justin French authored
59 </pre>
60
6734cfd @justinfrench sme typos and cleanups in the readme
authored
61 I also wrote the accompanying HTML output I expected, favoring something very similar to the fieldsets, lists and other semantic elements Aaron Gustafson presented in "Learning to Love Forms":http://www.slideshare.net/AaronGustafson/learning-to-love-forms-web-directions-south-07, hacking together enough Ruby to prove it could be done.
dcf8beb Initial Commit
Justin French authored
62
63
bdbe30b @justinfrench a few README clean-ups for 2.0
authored
64 h2. It's awesome because...
9af5cc8 @justinfrench Big update and re-organization of the README:
authored
65
64d55a8 @nathanl Improve grammar, capitalization, formatting
nathanl authored
66 * It can handle @belongs_to@ associations (like Post belongs_to :author), rendering a select or set of radio inputs with choices from the parent model.
67 * It can handle @has_many@ and @has_and_belongs_to_many@ associations (like: Post has_many :tags), rendering a multi-select with choices from the child models.
68 * It's Rails 3 compatible (including nested forms).
69 * It has internationalization (I18n)!
70 * It's _really_ quick to get started with a basic form in place (4 lines), then go back to add in more detail if you need it.
71 * There's heaps of elements, id and class attributes for you to hook in your CSS and JS.
72 * It handles real world stuff like inline hints, inline error messages & help text.
73 * It doesn't hijack or change any of the standard Rails form inputs, so you can still use them as expected (even mix and match).
74 * It's got absolutely awesome spec coverage.
75 * There's a bunch of people using and working on it (it's not just one developer building half a solution).
76 * It has growing HTML5 support (new inputs like email/phone/search, new attributes like required/min/max/step/placeholder)
9af5cc8 @justinfrench Big update and re-organization of the README:
authored
77
78
15e0bd9 updated the README a little to match last night's slides
Justin French authored
79 h2. Opinions
80
64d55a8 @nathanl Improve grammar, capitalization, formatting
nathanl authored
81 * It should be easier to do things the right way than the wrong way.
82 * Sometimes _more mark-up_ is better.
83 * Elements and attribute hooks are _gold_ for stylesheet authors.
84 * Make the common things we do easy, yet ensure uncommon things are still possible.
15e0bd9 updated the README a little to match last night's slides
Justin French authored
85
dcf8beb Initial Commit
Justin French authored
86
e3f04f6 @justinfrench README installation instructions simlified and clarified to specific …
authored
87 h2. Installation
c89e985 @justinfrench updating README with gem/plugin installation instructions
authored
88
ebe4e51 @justinfrench updated the README to reflect the new gem versions and other compatib…
authored
89 Simply add Formtastic to your Gemfile and bundle it up:
557f929 @justinfrench updated README to reflect new 1.1.0.beta gem, etc
authored
90
91 <pre>
22a9af1 @justinfrench prep README for 2.0
authored
92 gem 'formtastic'
557f929 @justinfrench updated README to reflect new 1.1.0.beta gem, etc
authored
93 </pre>
94
22a9af1 @justinfrench prep README for 2.0
authored
95 Run the installation generator:
c89e985 @justinfrench updating README with gem/plugin installation instructions
authored
96
97 <pre>
e3f04f6 @justinfrench README installation instructions simlified and clarified to specific …
authored
98 $ rails generate formtastic:install
c89e985 @justinfrench updating README with gem/plugin installation instructions
authored
99 </pre>
100
ebe4e51 @justinfrench updated the README to reflect the new gem versions and other compatib…
authored
101
102 h2. Stylesheets
c89e985 @justinfrench updating README with gem/plugin installation instructions
authored
103
28754a2 @justinfrench updated README for asset pipeline with ie6 & 7 css
authored
104 A proof-of-concept set of stylesheets are provided which you can include in your layout. Customization is best achieved by overriding these styles in an additional stylesheet.
4f4b069 @justinfrench Rails 3.1 Asset Pipeline compatibility (Fixes #563)
authored
105
106 h3. Stylesheet usage in Rails < 3.1:
107
108 <pre>
109 $ rails generate formtastic:install
110 </pre>
111
112 <pre>
113 # app/views/layouts/application.html.erb
114 <%= stylesheet_link_tag 'formtastic', 'my_formtastic_changes' %>
28754a2 @justinfrench updated README for asset pipeline with ie6 & 7 css
authored
115 <!--[if IE 6]><%= stylesheet_link_tag 'formtastic_ie6' %><![endif]-->
116 <!--[if IE 7]><%= stylesheet_link_tag 'formtastic_ie7' %><![endif]-->
4f4b069 @justinfrench Rails 3.1 Asset Pipeline compatibility (Fixes #563)
authored
117 </pre>
118
119 h3. Stylesheet usage in Rails >= 3.1:
120
e47ea4f clarify docs for conditional stylesheet use in Rails 3.1+
Brad Carson authored
121 Rails 3.1 introduces an asset pipeline that allows plugins like Formtastic to serve their own Stylesheets, Javascripts, etc without having to run generators that copy them across to the host application. Formtastic makes three stylesheets available as an Engine, you just need to require them in your global stylesheets.
c89e985 @justinfrench updating README with gem/plugin installation instructions
authored
122
5c1ce48 @justinfrench moved the stylesheets stuff up with installation
authored
123 <pre>
4f4b069 @justinfrench Rails 3.1 Asset Pipeline compatibility (Fixes #563)
authored
124 # app/assets/stylesheets/application.css
125 *= require formtastic
28754a2 @justinfrench updated README for asset pipeline with ie6 & 7 css
authored
126 *= require my_formtastic_changes
e47ea4f clarify docs for conditional stylesheet use in Rails 3.1+
Brad Carson authored
127 </pre>
128
129 Conditional stylesheets need to be compiled separately to prevent them being bundled and included with other application styles. Remove @require_tree .@ from application.css and specify required stylesheets individually.
130
131 <pre>
28754a2 @justinfrench updated README for asset pipeline with ie6 & 7 css
authored
132 # app/assets/stylesheets/ie6.css
133 *= require formtastic_ie6
134
135 # app/assets/stylesheets/ie7.css
136 *= require formtastic_ie7
5c1ce48 @justinfrench moved the stylesheets stuff up with installation
authored
137 </pre>
2526d2c @justinfrench Going back to generators instead of Rake tasks for copying stylesheet…
authored
138
28754a2 @justinfrench updated README for asset pipeline with ie6 & 7 css
authored
139 <pre>
140 # app/views/layouts/application.html.erb
141 <%= stylesheet_link_tag 'application' %>
142 <!--[if IE 6]><%= stylesheet_link_tag 'ie6' %><![endif]-->
143 <!--[if IE 7]><%= stylesheet_link_tag 'ie7' %><![endif]-->
144 </pre>
145
e47ea4f clarify docs for conditional stylesheet use in Rails 3.1+
Brad Carson authored
146 <pre>
147 # config/environments/production.rb
148 config.assets.precompile += %w( ie6.css ie7.css )
149 </pre>
4036e74 @justinfrench pruning and cleaning up the README, it's been a while
authored
150
9af5cc8 @justinfrench Big update and re-organization of the README:
authored
151 h2. Usage
152
153 Forms are really boring to code... you want to get onto the good stuff as fast as possible.
154
a429c6a @justinfrench change README to use actions instead of buttons
authored
155 This renders a set of inputs (one for _most_ columns in the database table, and one for each ActiveRecord @belongs_to@-association), followed by default action buttons (an input submit button):
9af5cc8 @justinfrench Big update and re-organization of the README:
authored
156
157 <pre>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
158 <%= semantic_form_for @user do |f| %>
159 <%= f.inputs %>
a429c6a @justinfrench change README to use actions instead of buttons
authored
160 <%= f.actions %>
9af5cc8 @justinfrench Big update and re-organization of the README:
authored
161 <% end %>
162 </pre>
163
bdbe30b @justinfrench a few README clean-ups for 2.0
authored
164 This is a great way to get something up fast, but like scaffolding, it's *not recommended for production*. Don't be so lazy!
5018ed0 @justinfrench clarified the differences in Rails 2 and 3 ERB blocks, and some other…
authored
165
a429c6a @justinfrench change README to use actions instead of buttons
authored
166 To specify the order of the fields, skip some of the fields or even add in fields that Formtastic couldn't infer. You can pass in a list of field names to @inputs@ and list of action names to @actions@:
9af5cc8 @justinfrench Big update and re-organization of the README:
authored
167
168 <pre>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
169 <%= semantic_form_for @user do |f| %>
170 <%= f.inputs :title, :body, :section, :categories, :created_at %>
a429c6a @justinfrench change README to use actions instead of buttons
authored
171 <%= f.actions :submit, :cancel %>
9af5cc8 @justinfrench Big update and re-organization of the README:
authored
172 <% end %>
173 </pre>
174
a429c6a @justinfrench change README to use actions instead of buttons
authored
175 You probably want control over the input type Formtastic uses for each field. You can expand the @inputs@ and @actions@ to block helper format and use the @:as@ option to specify an exact input type:
9af5cc8 @justinfrench Big update and re-organization of the README:
authored
176
177 <pre>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
178 <%= semantic_form_for @post do |f| %>
179 <%= f.inputs do %>
180 <%= f.input :title %>
181 <%= f.input :body %>
182 <%= f.input :section, :as => :radio %>
183 <%= f.input :categories %>
184 <%= f.input :created_at, :as => :string %>
9af5cc8 @justinfrench Big update and re-organization of the README:
authored
185 <% end %>
a429c6a @justinfrench change README to use actions instead of buttons
authored
186 <%= f.actions do %>
187 <%= f.action :submit, :as => :button %>
188 <%= f.action :cancel, :as => :link %>
9af5cc8 @justinfrench Big update and re-organization of the README:
authored
189 <% end %>
190 <% end %>
191 </pre>
192
a45853c @justinfrench small README typo
authored
193 If you want to customize the label text, or render some hint text below the field, specify which fields are required/optional, or break the form into two fieldsets, the DSL is pretty comprehensive:
9af5cc8 @justinfrench Big update and re-organization of the README:
authored
194
195 <pre>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
196 <%= semantic_form_for @post do |f| %>
197 <%= f.inputs "Basic", :id => "basic" do %>
198 <%= f.input :title %>
199 <%= f.input :body %>
9af5cc8 @justinfrench Big update and re-organization of the README:
authored
200 <% end %>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
201 <%= f.inputs :name => "Advanced Options", :id => "advanced" do %>
202 <%= f.input :slug, :label => "URL Title", :hint => "Created automatically if left blank", :required => false %>
203 <%= f.input :section, :as => :radio %>
204 <%= f.input :user, :label => "Author", :member_label => :full_name %>
205 <%= f.input :categories, :required => false %>
206 <%= f.input :created_at, :as => :string, :label => "Publication Date", :required => false %>
9af5cc8 @justinfrench Big update and re-organization of the README:
authored
207 <% end %>
a429c6a @justinfrench change README to use actions instead of buttons
authored
208 <%= f.actions do %>
390ced4 @haines Minor formatting/typo fixes
haines authored
209 <%= f.action :submit %>
9af5cc8 @justinfrench Big update and re-organization of the README:
authored
210 <% end %>
211 <% end %>
212 </pre>
213
4033f27 @nathanl Small addition to documentation
nathanl authored
214 You can create forms for nested resources:
215
216 <pre>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
217 <%= semantic_form_for [@author, @post] do |f| %>
4033f27 @nathanl Small addition to documentation
nathanl authored
218 </pre>
219
bcd3ba9 @justinfrench some README updates
authored
220 Nested forms are also supported (don't forget your models need to be setup correctly with @accepts_nested_attributes_for@). You can do it in the Rails way:
9af5cc8 @justinfrench Big update and re-organization of the README:
authored
221
222 <pre>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
223 <%= semantic_form_for @post do |f| %>
224 <%= f.inputs :title, :body, :created_at %>
225 <%= f.semantic_fields_for :author do |author| %>
1fcc068 @grimen An effort to make the README somewhat more readable.
grimen authored
226 <%= author.inputs :first_name, :last_name, :name => "Author" %>
41a6754 @josevalim Another README fix.
josevalim authored
227 <% end %>
a429c6a @justinfrench change README to use actions instead of buttons
authored
228 <%= f.actions %>
9997ce6 @josevalim Added more information about inputs :for in README.
josevalim authored
229 <% end %>
230 </pre>
231
6fd1bd2 @justinfrench improving the documentation in README
authored
232 Or the Formtastic way with the @:for@ option:
9997ce6 @josevalim Added more information about inputs :for in README.
josevalim authored
233
234 <pre>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
235 <%= semantic_form_for @post do |f| %>
236 <%= f.inputs :title, :body, :created_at %>
237 <%= f.inputs :first_name, :last_name, :for => :author, :name => "Author" %>
a429c6a @justinfrench change README to use actions instead of buttons
authored
238 <%= f.actions %>
9af5cc8 @justinfrench Big update and re-organization of the README:
authored
239 <% end %>
240 </pre>
241
64d55a8 @nathanl Improve grammar, capitalization, formatting
nathanl authored
242 When working in has many association, you can even supply @"%i"@ in your fieldset name; they will be properly interpolated with the child index. For example:
d5e3b0a @josevalim Added nested child nindex support.
josevalim authored
243
244 <pre>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
245 <%= semantic_form_for @post do |f| %>
246 <%= f.inputs %>
247 <%= f.inputs :name => 'Category #%i', :for => :categories %>
a429c6a @justinfrench change README to use actions instead of buttons
authored
248 <%= f.actions %>
d5e3b0a @josevalim Added nested child nindex support.
josevalim authored
249 <% end %>
250 </pre>
251
8b1f016 @mhuggins Pass current label as arguments to inputs block for nested inputs
mhuggins authored
252 Alternatively, the current index can be accessed via the `inputs` block's arguments for use anywhere:
253
254 <pre>
255 <%= semantic_form_for @post do |f| %>
256 <%= f.inputs :for => :categories do |category, i| %>
257 <% if i <= 2 %>
258 <%= f.inputs :name => "Category ##{i}" %>
259 <% else %>
260 <%= f.inputs :name => "Category ##{i} (optional)" %>
261 <% end %>
262 <% end %>
263 <%= f.actions %>
264 <% end %>
265 </pre>
266
64d55a8 @nathanl Improve grammar, capitalization, formatting
nathanl authored
267 If you have more than one form on the same page, it may lead to HTML invalidation because of the way HTML element id attributes are assigned. You can provide a namespace for your form to ensure uniqueness of id attributes on form elements. The namespace attribute will be prefixed with underscore on the generate HTML id. For example:
d174db0 @asanghi change id_prefix to namespace; added documentation in README
asanghi authored
268
269 <pre>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
270 <%= semantic_form_for(@post, :namespace => 'cat_form') do |f| %>
600e013 @justinfrench always use inputs() block in README examples, less chance of WTF moments
authored
271 <%= f.inputs do %>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
272 <%= f.input :title %> # id="cat_form_post_title"
273 <%= f.input :body %> # id="cat_form_post_body"
274 <%= f.input :created_at %> # id="cat_form_post_created_at"
600e013 @justinfrench always use inputs() block in README examples, less chance of WTF moments
authored
275 <% end %>
a429c6a @justinfrench change README to use actions instead of buttons
authored
276 <%= f.actions %>
d174db0 @asanghi change id_prefix to namespace; added documentation in README
asanghi authored
277 <% end %>
278 </pre>
6fd1bd2 @justinfrench improving the documentation in README
authored
279
64d55a8 @nathanl Improve grammar, capitalization, formatting
nathanl authored
280 Customize HTML attributes for any input using the @:input_html@ option. Typically this is used to disable the input, change the size of a text field, change the rows in a textarea, or even to add a special class to an input to attach special behavior like "autogrow":http://plugins.jquery.com/project/autogrowtextarea textareas:
6fd1bd2 @justinfrench improving the documentation in README
authored
281
282 <pre>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
283 <%= semantic_form_for @post do |f| %>
600e013 @justinfrench always use inputs() block in README examples, less chance of WTF moments
authored
284 <%= f.inputs do %>
c36692c @justinfrench cols => size in README, fixes #753
authored
285 <%= f.input :title, :input_html => { :size => 10 } %>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
286 <%= f.input :body, :input_html => { :class => 'autogrow', :rows => 10, :cols => 20, :maxlength => 10 } %>
287 <%= f.input :created_at, :input_html => { :disabled => true } %>
c7b9849 @ZachBeta Added a little sample of :input_html => { :readonly => true } which I…
ZachBeta authored
288 <%= f.input :updated_at, :input_html => { :readonly => true } %>
600e013 @justinfrench always use inputs() block in README examples, less chance of WTF moments
authored
289 <% end %>
a429c6a @justinfrench change README to use actions instead of buttons
authored
290 <%= f.actions %>
6fd1bd2 @justinfrench improving the documentation in README
authored
291 <% end %>
292 </pre>
293
a429c6a @justinfrench change README to use actions instead of buttons
authored
294 The same can be done for actions with the @:button_html@ option:
6fd1bd2 @justinfrench improving the documentation in README
authored
295
296 <pre>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
297 <%= semantic_form_for @post do |f| %>
6fd1bd2 @justinfrench improving the documentation in README
authored
298 ...
a429c6a @justinfrench change README to use actions instead of buttons
authored
299 <%= f.actions do %>
300 <%= f.action :submit, :button_html => { :class => "primary", :disable_with => 'Wait...' } %>
6fd1bd2 @justinfrench improving the documentation in README
authored
301 <% end %>
302 <% end %>
303 </pre>
304
64d55a8 @nathanl Improve grammar, capitalization, formatting
nathanl authored
305 Customize the HTML attributes for the @<li>@ wrapper around every input with the @:wrapper_html@ option hash. There's one special key in the hash: (@:class@), which will actually _append_ your string of classes to the existing classes provided by Formtastic (like @"required string error"@).
1fcc068 @grimen An effort to make the README somewhat more readable.
grimen authored
306
6fd1bd2 @justinfrench improving the documentation in README
authored
307 <pre>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
308 <%= semantic_form_for @post do |f| %>
600e013 @justinfrench always use inputs() block in README examples, less chance of WTF moments
authored
309 <%= f.inputs do %>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
310 <%= f.input :title, :wrapper_html => { :class => "important" } %>
311 <%= f.input :body %>
312 <%= f.input :description, :wrapper_html => { :style => "display:none;" } %>
600e013 @justinfrench always use inputs() block in README examples, less chance of WTF moments
authored
313 <% end %>
6fd1bd2 @justinfrench improving the documentation in README
authored
314 ...
315 <% end %>
316 </pre>
317
a92cf7c @justinfrench added documentation for :collection option, resolves #181
authored
318 Many inputs provide a collection of options to choose from (like @:select@, @:radio@, @:check_boxes@, @:boolean@). In many cases, Formtastic can find choices through the model associations, but if you want to use your own set of choices, the @:collection@ option is what you want. You can pass in an Array of objects, an array of Strings, a Hash... Throw almost anything at it! Examples:
319
320 <pre>
f6d792f @denispeplin Replace deprecated "find(:all)" with "all" method
denispeplin authored
321 f.input :authors, :as => :check_boxes, :collection => User.order("last_name ASC").all
a92cf7c @justinfrench added documentation for :collection option, resolves #181
authored
322 f.input :authors, :as => :check_boxes, :collection => current_user.company.users.active
323 f.input :authors, :as => :check_boxes, :collection => [@justin, @kate]
324 f.input :authors, :as => :check_boxes, :collection => ["Justin", "Kate", "Amelia", "Gus", "Meg"]
f6d792f @denispeplin Replace deprecated "find(:all)" with "all" method
denispeplin authored
325 f.input :author, :as => :select, :collection => Author.all
a92cf7c @justinfrench added documentation for :collection option, resolves #181
authored
326 f.input :author, :as => :select, :collection => { @justin.name => @justin.id, @kate.name => @kate.id }
327 f.input :author, :as => :select, :collection => ["Justin", "Kate", "Amelia", "Gus", "Meg"]
f6d792f @denispeplin Replace deprecated "find(:all)" with "all" method
denispeplin authored
328 f.input :author, :as => :radio, :collection => User.all
a92cf7c @justinfrench added documentation for :collection option, resolves #181
authored
329 f.input :author, :as => :radio, :collection => [@justin, @kate]
330 f.input :author, :as => :radio, :collection => { @justin.name => @justin.id, @kate.name => @kate.id }
331 f.input :author, :as => :radio, :collection => ["Justin", "Kate", "Amelia", "Gus", "Meg"]
332 f.input :admin, :as => :radio, :collection => ["Yes!", "No"]
f9e7ecd @ZachBeta Added a custom hash to the readme, should be compatable with rb 1.8.7…
ZachBeta authored
333 f.input :book_id, :as => :select, :collection => Hash[Book.all.map{|b| [b.name,b.id]}]
a92cf7c @justinfrench added documentation for :collection option, resolves #181
authored
334 </pre>
335
6fd1bd2 @justinfrench improving the documentation in README
authored
336
5a39443 @justinfrench bulking up the documentation and readme with the different inputs ava…
authored
337 h2. The Available Inputs
338
d9a06fe @grimen README: Last set of polishing moves for now.
grimen authored
339 The Formtastic input types:
340
8577c18 @grimen More README-readability polishing.
grimen authored
341 * @:select@ - a select menu. Default for ActiveRecord associations: @belongs_to@, @has_many@, and @has_and_belongs_to_many@.
342 * @:check_boxes@ - a set of check_box inputs. Alternative to @:select@ for ActiveRecord-associations: @has_many@, and @has_and_belongs_to_many@.
343 * @:radio@ - a set of radio inputs. Alternative to @:select@ for ActiveRecord-associations: @belongs_to@.
344 * @:time_zone@ - a select input. Default for column types: @:string@ with name matching @"time_zone"@.
345 * @:password@ - a password input. Default for column types: @:string@ with name matching @"password"@.
346 * @:text@ - a textarea. Default for column types: @:text@.
a315547 @justinfrench Rename DateInput, TimeInput, DatetimeInput:
authored
347 * @:date_select@ - a date select. Default for column types: @:date@.
348 * @:datetime_select@ - a date and time select. Default for column types: @:datetime@ and @:timestamp@.
349 * @:time_select@ - a time select. Default for column types: @:time@.
8577c18 @grimen More README-readability polishing.
grimen authored
350 * @:boolean@ - a checkbox. Default for column types: @:boolean@.
351 * @:string@ - a text field. Default for column types: @:string@.
a33f4d0 @justinfrench renamed NumericInput (:as => :numeric) to NumberInput (:as => :number)
authored
352 * @:number@ - a text field (just like string). Default for column types: @:integer@, @:float@, and @:decimal@.
8577c18 @grimen More README-readability polishing.
grimen authored
353 * @:file@ - a file field. Default for file-attachment attributes matching: "paperclip":http://github.com/thoughtbot/paperclip or "attachment_fu":http://github.com/technoweenie/attachment_fu.
354 * @:country@ - a select menu of country names. Default for column types: :string with name @"country"@ - requires a *country_select* plugin to be installed.
e0a7874 @asanghi Added auto-guessing and updated some docs
asanghi authored
355 * @:email@ - a text field (just like string). Default for columns with name matching @"email"@. New in HTML5. Works on some mobile browsers already.
356 * @:url@ - a text field (just like string). Default for columns with name matching @"url"@. New in HTML5. Works on some mobile browsers already.
357 * @:phone@ - a text field (just like string). Default for columns with name matching @"phone"@ or @"fax"@. New in HTML5.
358 * @:search@ - a text field (just like string). Default for columns with name matching @"search"@. New in HTML5. Works on Safari.
6688887 @grimen More README-polishing.
grimen authored
359 * @:hidden@ - a hidden field. Creates a hidden field (added for compatibility).
d877b6b @justinfrench Merge branch 'refactor' of https://github.com/okonski/formtastic into…
authored
360 * @:range@ - a slider field.
6688887 @grimen More README-polishing.
grimen authored
361
fd23ef4 @justinfrench tiny README tweak
authored
362 The comments in the code are pretty good for each of these (what it does, what the output is, what the options are, etc.) so go check it out.
363
5a39443 @justinfrench bulking up the documentation and readme with the different inputs ava…
authored
364
06ff25d @lardawge Added section clarifying label lookup order.
lardawge authored
365 h2. Delegation for label lookups
366
367 Formtastic decides which label to use in the following order:
368
369 <pre>
370 1. :label # :label => "Choose Title"
371 2. Formtastic i18n # if either :label => true || i18n_lookups_by_default = true (see Internationalization)
372 3. Activerecord i18n # if localization file found for the given attribute
373 4. label_str_method # if nothing provided this defaults to :humanize but can be set to a custom method
374 </pre>
375
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
376 h2. Internationalization (I18n)
377
49a18a5 @grimen README-update: I18n instructions are better structured, and easier to…
grimen authored
378 h3. Basic Localization
71ef99f @justinfrench nuked the configuration copy/paste from the README, linked to the gen…
authored
379
64d55a8 @nathanl Improve grammar, capitalization, formatting
nathanl authored
380 Formtastic has some neat I18n-features. ActiveRecord object names and attributes are, by default, taken from calling @@object.human_name@ and @@object.human_attribute_name(attr)@ respectively. There are a few words specific to Formtastic that can be translated. See @lib/locale/en.yml@ for more information.
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
381
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored
382 Basic localization (labels only, with ActiveRecord):
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
383
384 <pre>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
385 <%= semantic_form_for @post do |f| %>
600e013 @justinfrench always use inputs() block in README examples, less chance of WTF moments
authored
386 <%= f.inputs do %>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
387 <%= f.input :title %> # => :label => I18n.t('activerecord.attributes.user.title') or 'Title'
388 <%= f.input :body %> # => :label => I18n.t('activerecord.attributes.user.body') or 'Body'
389 <%= f.input :section %> # => :label => I18n.t('activerecord.attributes.user.section') or 'Section'
600e013 @justinfrench always use inputs() block in README examples, less chance of WTF moments
authored
390 <% end %>
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
391 <% end %>
392 </pre>
393
49a18a5 @grimen README-update: I18n instructions are better structured, and easier to…
grimen authored
394 *Note:* This is perfectly fine if you just want your labels/attributes and/or models to be translated using *ActiveRecord I18n attribute translations*, and you don't use input hints and legends. But what if you do? And what if you don't want same labels in all forms?
395
396 h3. Enhanced Localization (Formtastic I18n API)
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
397
d9a06fe @grimen README: Last set of polishing moves for now.
grimen authored
398 Formtastic supports localized *labels*, *hints*, *legends*, *actions* using the I18n API for more advanced usage. Your forms can now be DRYer and more flexible than ever, and still fully localized. This is how:
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
399
49a18a5 @grimen README-update: I18n instructions are better structured, and easier to…
grimen authored
400 *1. Enable I18n lookups by default (@config/initializers/formtastic.rb@):*
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
401
402 <pre>
549ef7a @justinfrench Renamed all instances of Formtastic::SemanticFormBuilder to Formtasti…
authored
403 Formtastic::FormBuilder.i18n_lookups_by_default = true
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
404 </pre>
405
49a18a5 @grimen README-update: I18n instructions are better structured, and easier to…
grimen authored
406 *2. Add some cool label-translations/variants (@config/locale/en.yml@):*
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
407
408 <pre>
409 en:
410 formtastic:
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored
411 titles:
412 post_details: "Post details"
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
413 labels:
414 post:
13164f7 @justinfrench Allow HTML5 placeholder attributes to be set on String-ish inputs (st…
authored
415 title: "Your Title"
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
416 body: "Write something..."
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored
417 edit:
418 title: "Edit title"
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
419 hints:
420 post:
64d55a8 @nathanl Improve grammar, capitalization, formatting
nathanl authored
421 title: "Choose a good title for your post."
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
422 body: "Write something inspiring here."
13164f7 @justinfrench Allow HTML5 placeholder attributes to be set on String-ish inputs (st…
authored
423 placeholders:
424 post:
425 title: "Title your post"
426 slug: "Leave blank for an automatically generated slug"
427 user:
428 email: "you@yours.com"
4aca8cd @grimen New I18n-features:
grimen authored
429 actions:
743b26b @yabawock Revert "Reverting two i18n patches pulled in from the rails3 branch w…
yabawock authored
430 create: "Create my %{model}"
4aca8cd @grimen New I18n-features:
grimen authored
431 update: "Save changes"
7723de7 @justinfrench Introducing actions for submit, cancel and reset buttons
authored
432 reset: "Reset form"
433 cancel: "Cancel and go back"
4aca8cd @grimen New I18n-features:
grimen authored
434 dummie: "Launch!"
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
435 </pre>
436
49a18a5 @grimen README-update: I18n instructions are better structured, and easier to…
grimen authored
437 *3. ...and now you'll get:*
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
438
439 <pre>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
440 <%= semantic_form_for Post.new do |f| %>
441 <%= f.inputs do %>
442 <%= f.input :title %> # => :label => "Choose a title...", :hint => "Choose a good title for your post."
443 <%= f.input :body %> # => :label => "Write something...", :hint => "Write something inspiring here."
444 <%= f.input :section %> # => :label => I18n.t('activerecord.attributes.user.section') or 'Section'
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored
445 <% end %>
a429c6a @justinfrench change README to use actions instead of buttons
authored
446 <%= f.actions do %>
390ced4 @haines Minor formatting/typo fixes
haines authored
447 <%= f.action :submit %> # => "Create my %{model}"
4aca8cd @grimen New I18n-features:
grimen authored
448 <% end %>
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
449 <% end %>
450 </pre>
451
49a18a5 @grimen README-update: I18n instructions are better structured, and easier to…
grimen authored
452 *4. Localized titles (a.k.a. legends):*
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored
453
17f6668 @justinfrench Revert "This reverts commit 440bd2d."
authored
454 _Note: Slightly different because Formtastic can't guess how you group fields in a form. Legend text can be set with first (as in the sample below) specified value, or :name/:title options - depending on what flavor is preferred._
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored
455
456 <pre>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
457 <%= semantic_form_for @post do |f| %>
458 <%= f.inputs :post_details do %> # => :title => "Post details"
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored
459 # ...
460 <% end %>
461 # ...
462 <% end %>
463 </pre>
464
49a18a5 @grimen README-update: I18n instructions are better structured, and easier to…
grimen authored
465 *5. Override I18n settings:*
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
466
467 <pre>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
468 <%= semantic_form_for @post do |f| %>
469 <%= f.inputs do %>
470 <%= f.input :title %> # => :label => "Choose a title...", :hint => "Choose a good title for your post."
471 <%= f.input :body, :hint => false %> # => :label => "Write something..."
472 <%= f.input :section, :label => 'Some section' %> # => :label => 'Some section'
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored
473 <% end %>
a429c6a @justinfrench change README to use actions instead of buttons
authored
474 <%= f.actions do %>
390ced4 @haines Minor formatting/typo fixes
haines authored
475 <%= f.action :submit, :label => :dummie %> # => "Launch!"
4aca8cd @grimen New I18n-features:
grimen authored
476 <% end %>
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
477 <% end %>
478 </pre>
479
480 If I18n-lookups is disabled, i.e.:
481
482 <pre>
549ef7a @justinfrench Renamed all instances of Formtastic::SemanticFormBuilder to Formtasti…
authored
483 Formtastic::FormBuilder.i18n_lookups_by_default = false
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
484 </pre>
485
486 ...then you can enable I18n within the forms instead:
487
488 <pre>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
489 <%= semantic_form_for @post do |f| %>
490 <%= f.inputs do %>
491 <%= f.input :title, :label => true %> # => :label => "Choose a title..."
492 <%= f.input :body, :label => true %> # => :label => "Write something..."
493 <%= f.input :section, :label => true %> # => :label => I18n.t('activerecord.attributes.user.section') or 'Section'
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored
494 <% end %>
a429c6a @justinfrench change README to use actions instead of buttons
authored
495 <%= f.actions do %>
496 <%= f.action :submit, :label => true %> # => "Update %{model}" (if we are in edit that is...)
4aca8cd @grimen New I18n-features:
grimen authored
497 <% end %>
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
498 <% end %>
499 </pre>
500
49a18a5 @grimen README-update: I18n instructions are better structured, and easier to…
grimen authored
501 *6. Advanced I18n lookups*
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
502
64d55a8 @nathanl Improve grammar, capitalization, formatting
nathanl authored
503 For more flexible forms; Formtastic finds translations using a bottom-up approach taking the following variables in account:
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
504
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored
505 * @MODEL@, e.g. "post"
506 * @ACTION@, e.g. "edit"
4aca8cd @grimen New I18n-features:
grimen authored
507 * @KEY/ATTRIBUTE@, e.g. "title", :my_custom_key, ...
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
508
509 ...in the following order:
510
6688887 @grimen More README-polishing.
grimen authored
511 1. @formtastic.{titles,labels,hints,actions}.MODEL.ACTION.ATTRIBUTE@ - by model and action
512 2. @formtastic.{titles,labels,hints,actions}.MODEL.ATTRIBUTE@ - by model
513 3. @formtastic.{titles,labels,hints,actions}.ATTRIBUTE@ - global default
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored
514
515 ...which means that you can define translations like this:
516
517 <pre>
518 en:
519 formtastic:
520 labels:
521 title: "Title" # Default global value
522 article:
523 body: "Article content"
524 post:
525 new:
526 title: "Choose a title..."
527 body: "Write something..."
528 edit:
529 title: "Edit title"
530 body: "Edit body"
531 </pre>
532
4aca8cd @grimen New I18n-features:
grimen authored
533 Values for @labels@/@hints@/@actions@ are can take values: @String@ (explicit value), @Symbol@ (i18n-lookup-key relative to the current "type", e.g. actions:), @true@ (force I18n lookup), @false@ (force no I18n lookup). Titles (legends) can only take: @String@ and @Symbol@ - true/false have no meaning.
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored
534
71ef99f @justinfrench nuked the configuration copy/paste from the README, linked to the gen…
authored
535
c4ebcef * added semantic_errors method with specs
Wojciech Wnętrzak authored
536 h2. Semantic errors
537
538 You can show errors on base (by default) and any other attribute just passing it name to semantic_errors method:
539
540 <pre>
913215e @justinfrench use |f| consistently in README for form builder variable name
authored
541 <%= semantic_form_for @post do |f| %>
542 <%= f.semantic_errors :state %>
c4ebcef * added semantic_errors method with specs
Wojciech Wnętrzak authored
543 <% end %>
544 </pre>
545
546
7687bf7 @justinfrench Added support for modified and custom inputs in app/inputs/.
authored
547 h2. Modified & Custom Inputs
ce7da5e @justinfrench added the builder config to the config template and quick documentati…
authored
548
eb9e523 @nathanl Better documentation for custom inputs
nathanl authored
549 You can modify existing inputs, subclass them, or create your own from scratch. Here's the basic process:
550
551 * Create a file in @app/inputs@ with a filename ending in @_input.rb@. For example, @app/inputs/hat_size_input.rb@. Formtastic will automatically look in @app/inputs@ and find the file.
552 * In that file, declare a classname ending in @Input@. For example, @class HatSizeInput@. It must have a @to_html@ method for rendering.
553 * To use that input, leave off the word "input" in your @as@ statement. For example, @f.input(:size, :as => :hat_size)@
554
555 Specific examples follow.
556
557 h3. Changing Existing Input Behavior
558
559 To modify the behavior of @StringInput@, subclass it in a new file, @app/inputs/string_input.rb@:
ce7da5e @justinfrench added the builder config to the config template and quick documentati…
authored
560
7687bf7 @justinfrench Added support for modified and custom inputs in app/inputs/.
authored
561 <pre>
562 class StringInput < Formtastic::Inputs::StringInput
563 def to_html
564 puts "this is my modified version of StringInput"
565 super
566 end
567 end
568 </pre>
ce7da5e @justinfrench added the builder config to the config template and quick documentati…
authored
569
eb9e523 @nathanl Better documentation for custom inputs
nathanl authored
570 You can use your modified version with @:as => :string@.
571
572 h3. Creating New Inputs Based on Existing Ones
573
574 To create your own new types of inputs based on existing inputs, the process is similar. For example, to create @FlexibleTextInput@ based on @StringInput@, put the following in @app/inputs/flexible_text_input.rb@:
ce7da5e @justinfrench added the builder config to the config template and quick documentati…
authored
575
28bb57f @paneq Resolves http://github.com/justinfrench/formtastic/issues/#issue/409
paneq authored
576 <pre>
d57c054 @robinst README: Fix mention of inexistent StringTextInput
robinst authored
577 class FlexibleTextInput < Formtastic::Inputs::StringInput
7687bf7 @justinfrench Added support for modified and custom inputs in app/inputs/.
authored
578 def input_html_options
579 super.merge(:class => "flexible-text-area")
580 end
581 end
28bb57f @paneq Resolves http://github.com/justinfrench/formtastic/issues/#issue/409
paneq authored
582 </pre>
3f58f3a @justinfrench README update for --controller option form generator
authored
583
eb9e523 @nathanl Better documentation for custom inputs
nathanl authored
584 You can use your new input with @:as => :flexible_text@.
585
586 h3. Creating New Inputs From Scratch
587
588 To create a custom @DatePickerInput@ from scratch, put the following in @app/inputs/date_picker_input.rb@:
7687bf7 @justinfrench Added support for modified and custom inputs in app/inputs/.
authored
589
590 <pre>
34d6e16 @robinst README: Fix custom input example about DatePicker
robinst authored
591 class DatePickerInput
592 include Formtastic::Inputs::Base
593 def to_html
594 # ...
7687bf7 @justinfrench Added support for modified and custom inputs in app/inputs/.
authored
595 end
596 end
597 </pre>
598
eb9e523 @nathanl Better documentation for custom inputs
nathanl authored
599 You can use your new input with @:as => :date_picker@.
600
601 h3. Don't subclass Formtastic::FormBuilder anymore
602
22a9af1 @justinfrench prep README for 2.0
authored
603 It was previously recommended in Formtastic 1.x to subclass Formtastic::FormBuilder to add your own inputs. This is no longer recommended in Formtastic 2, and will not work as expected.
7687bf7 @justinfrench Added support for modified and custom inputs in app/inputs/.
authored
604
5f3d7a6 @justinfrench updated the generator docs in README to reflect both Rails 3 and 2
authored
605
2d2d813 @yabawock More intelligent way to html_escape labels and hints (GH-299)
yabawock authored
606 h2. Security
ce7da5e @justinfrench added the builder config to the config template and quick documentati…
authored
607
64d55a8 @nathanl Improve grammar, capitalization, formatting
nathanl authored
608 By default, Formtastic escapes HTML entities in both labels and hints unless a string is marked as html_safe. If you are using an older rails version which doesn't know html_safe, or you want to globally turn this feature off, you can set the following in your initializer:
2d2d813 @yabawock More intelligent way to html_escape labels and hints (GH-299)
yabawock authored
609
549ef7a @justinfrench Renamed all instances of Formtastic::SemanticFormBuilder to Formtasti…
authored
610 Formtastic::FormBuilder.escape_html_entities_in_hints_and_labels = false
3f58f3a @justinfrench README update for --controller option form generator
authored
611
612
9af5cc8 @justinfrench Big update and re-organization of the README:
authored
613 h2. Dependencies
dcf8beb Initial Commit
Justin French authored
614
c462c09 @justinfrench update readme, make docs clearer, remove google group, etc
authored
615 There are none other than Rails itself, but...
dcf8beb Initial Commit
Justin French authored
616
64d55a8 @nathanl Improve grammar, capitalization, formatting
nathanl authored
617 * If you want to use the @:country@ input, you'll need to install the "country-select plugin":https://github.com/chrislerum/country_select (or any other country_select plugin with the same API).
c462c09 @justinfrench update readme, make docs clearer, remove google group, etc
authored
618 * There are a bunch of development dependencies
dcf8beb Initial Commit
Justin French authored
619
0b370ba @justinfrench Renamed input_field_set() to just inputs() and added a shorthand vers…
authored
620
2079c59 @justinfrench added a section about contributing to README
authored
621 h2. How to contribute
622
35e228e @justinfrench updates to README
authored
623 * Fork the project on Github
624 * Create a topic branch for your changes
c462c09 @justinfrench update readme, make docs clearer, remove google group, etc
authored
625 * Ensure that you provide test coverage for your changes
35e228e @justinfrench updates to README
authored
626 * Ensure that all tests pass (`bundle exec rake`)
627 * Create a pull request on Github
2079c59 @justinfrench added a section about contributing to README
authored
628
90282e3 @justinfrench added twitter account to the readme
authored
629
ba3ce05 @justinfrench updated the README a little with contributors and some other busy work
authored
630 h2. Project Info
631
35e228e @justinfrench updates to README
authored
632 Formtastic was created by "Justin French":http://www.justinfrench.com with contributions from around 150 awesome developers. Run @git shortlog -n -s@ to see the awesome.
ba3ce05 @justinfrench updated the README a little with contributors and some other busy work
authored
633
eff38a1 @justinfrench too hard to maintain the maintainers
authored
634 The project is hosted on Github: "http://github.com/justinfrench/formtastic":http://github.com/justinfrench/formtastic, where your contributions, forkings, comments, issues and feedback are greatly welcomed.
ba3ce05 @justinfrench updated the README a little with contributors and some other busy work
authored
635
35e228e @justinfrench updates to README
authored
636 Copyright (c) 2007-2012 Justin French, released under the MIT license.
Something went wrong with that request. Please try again.