Skip to content
Newer
Older
100644 656 lines (476 sloc) 27.9 KB
420b4ce @justinfrench sick of updating the README with every version bump :)
authored Apr 22, 2009
1 h1. Formtastic
dcf8beb Initial Commit
Justin French authored Apr 7, 2008
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
1bbe8ea @justinfrench add the pledgie badge back in, GH don't show them any more?
authored Oct 8, 2010
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://www.pledgie.com/campaigns/2178.png?skin_name=chrome' border='0' /></a>
6
09d957d textilized the README so that it looks pretty pretty on GitHub
Justin French authored Apr 29, 2008
7 h2. The Story
dcf8beb Initial Commit
Justin French authored Apr 7, 2008
8
2d4a72b @justinfrench big update to the README
authored Feb 16, 2009
9 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 Apr 7, 2008
10
09d957d textilized the README so that it looks pretty pretty on GitHub
Justin French authored Apr 29, 2008
11 <pre>
7e3874a @justinfrench trying to fix README formatting of <'s at the start of lines
authored Aug 13, 2008
12 <% semantic_form_for @article do |form| %>
353618e @markmansour Extending Formtastic can be done by overriding the semantic_form_buil…
markmansour authored Jan 13, 2009
13
0b370ba @justinfrench Renamed input_field_set() to just inputs() and added a shorthand vers…
authored Jan 6, 2009
14 <% form.inputs :name => "Basic" do %>
353618e @markmansour Extending Formtastic can be done by overriding the semantic_form_buil…
markmansour authored Jan 13, 2009
15 <%= form.input :title %>
16 <%= form.input :body %>
1db292f @sprsquish update README to reflect association attribute changes
sprsquish authored Feb 28, 2009
17 <%= form.input :section %>
18 <%= form.input :publication_state, :as => :radio %>
9997ce6 @josevalim Added more information about inputs :for in README.
josevalim authored Mar 7, 2009
19 <%= form.input :category %>
353618e @markmansour Extending Formtastic can be done by overriding the semantic_form_buil…
markmansour authored Jan 13, 2009
20 <%= form.input :allow_comments, :label => "Allow commenting on this article" %>
21 <% end %>
22
0b370ba @justinfrench Renamed input_field_set() to just inputs() and added a shorthand vers…
authored Jan 6, 2009
23 <% form.inputs :name => "Advanced" do %>
353618e @markmansour Extending Formtastic can be done by overriding the semantic_form_buil…
markmansour authored Jan 13, 2009
24 <%= form.input :keywords, :required => false, :hint => "Example: ruby, rails, forms" %>
7e3874a @justinfrench trying to fix README formatting of <'s at the start of lines
authored Aug 14, 2008
25 <%= form.input :extract, :required => false %>
26 <%= form.input :description, :required => false %>
353618e @markmansour Extending Formtastic can be done by overriding the semantic_form_buil…
markmansour authored Jan 13, 2009
27 <%= form.input :url_title, :required => false %>
7e3874a @justinfrench trying to fix README formatting of <'s at the start of lines
authored Aug 14, 2008
28 <% end %>
29
05ae54d @josevalim Fixed nested attributes example in README
josevalim authored Mar 22, 2009
30 <% form.inputs :name => "Author", :for => :author do |author_form| %>
31 <%= author_form.input :first_name %>
32 <%= author_form.input :last_name %>
9997ce6 @josevalim Added more information about inputs :for in README.
josevalim authored Mar 7, 2009
33 <% end %>
34
353618e @markmansour Extending Formtastic can be done by overriding the semantic_form_buil…
markmansour authored Jan 13, 2009
35 <% form.buttons do %>
36 <%= form.commit_button %>
7e3874a @justinfrench trying to fix README formatting of <'s at the start of lines
authored Aug 14, 2008
37 <% end %>
09d957d textilized the README so that it looks pretty pretty on GitHub
Justin French authored Apr 29, 2008
38
dcf8beb Initial Commit
Justin French authored Apr 7, 2008
39 <% end %>
09d957d textilized the README so that it looks pretty pretty on GitHub
Justin French authored Apr 29, 2008
40 </pre>
41
6734cfd @justinfrench sme typos and cleanups in the readme
authored Jul 21, 2008
42 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 Apr 7, 2008
43
44
9af5cc8 @justinfrench Big update and re-organization of the README:
authored Feb 28, 2009
45 h2. It's better than _SomeOtherFormBuilder_ because...
46
6688887 @grimen More README-polishing.
grimen authored Oct 25, 2009
47 * 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.
48 * 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.
bcd3ba9 @justinfrench some README updates
authored Oct 26, 2010
49 * it's Rails 2.x and 3.x compatible (including nested forms).
f02b136 @justinfrench rearranged and beefed up the 'it's better than...' README section
authored Mar 1, 2009
50 * it has internationalization (I18n)!
6688887 @grimen More README-polishing.
grimen authored Oct 25, 2009
51 * 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.
52 * there's heaps of elements, id and class attributes for you to hook in your CSS and JS.
53 * it handles real world stuff like inline hints, inline error messages & help text.
54 * 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).
55 * it's got absolutely awesome spec coverage.
56 * there's a bunch of people using and working on it (it's not just one developer building half a solution).
9af5cc8 @justinfrench Big update and re-organization of the README:
authored Feb 28, 2009
57
58
15e0bd9 updated the README a little to match last night's slides
Justin French authored May 30, 2008
59 h2. Why?
60
6688887 @grimen More README-polishing.
grimen authored Oct 25, 2009
61 * web apps = lots of forms.
62 * forms are so friggin' boring to code.
63 * semantically rich & accessible forms really are possible.
64 * the "V" is way behind the "M" and "C" in Rails' MVC – it's the ugly sibling.
65 * best practices and common patterns have to start somewhere.
66 * i need a challenge.
dcf8beb Initial Commit
Justin French authored Apr 7, 2008
67
68
15e0bd9 updated the README a little to match last night's slides
Justin French authored May 29, 2008
69 h2. Opinions
70
6688887 @grimen More README-polishing.
grimen authored Oct 25, 2009
71 * it should be easier to do things the right way than the wrong way.
72 * sometimes _more mark-up_ is better.
73 * elements and attribute hooks are _gold_ for stylesheet authors.
74 * make the common things we do easy, yet still ensure uncommon things are still possible.
15e0bd9 updated the README a little to match last night's slides
Justin French authored May 29, 2008
75
dcf8beb Initial Commit
Justin French authored Apr 7, 2008
76
3dd6455 @justinfrench Link to RDoc URL in README
authored Jul 3, 2009
77 h2. Documentation
78
79 RDoc documentation _should_ be automatically generated after each commit and made available on the "rdoc.info website":http://rdoc.info/projects/justinfrench/formtastic.
80
81
e3f04f6 @justinfrench README installation instructions simlified and clarified to specific …
authored Sep 13, 2010
82 h2. Installation
c89e985 @justinfrench updating README with gem/plugin installation instructions
authored Mar 8, 2009
83
ebe4e51 @justinfrench updated the README to reflect the new gem versions and other compatib…
authored Sep 8, 2010
84 Formtastic is now compatible with both Rails 2 and Rails 3, and the gem is "hosted":http://rubygems.org/gems/formtastic on RubyGems.org.
4036e74 @justinfrench pruning and cleaning up the README, it's been a while
authored Jul 21, 2010
85
e3f04f6 @justinfrench README installation instructions simlified and clarified to specific …
authored Sep 13, 2010
86 *You'll need to use Bundler (yes, even under Rails 2, due to the many ways gem dependencies suck). Follow "this tutorial":http://gembundler.com/rails23.html.*
557f929 @justinfrench updated README to reflect new 1.1.0.beta gem, etc
authored Aug 28, 2010
87
ebe4e51 @justinfrench updated the README to reflect the new gem versions and other compatib…
authored Sep 8, 2010
88 Simply add Formtastic to your Gemfile and bundle it up:
557f929 @justinfrench updated README to reflect new 1.1.0.beta gem, etc
authored Aug 28, 2010
89
90 <pre>
ebe4e51 @justinfrench updated the README to reflect the new gem versions and other compatib…
authored Sep 8, 2010
91 gem 'formtastic', '~> 1.1.0'
557f929 @justinfrench updated README to reflect new 1.1.0.beta gem, etc
authored Aug 28, 2010
92 </pre>
93
e3f04f6 @justinfrench README installation instructions simlified and clarified to specific …
authored Sep 13, 2010
94 Optionally, run the generator to copy some stylesheets and a configuration initializer into your application:
c89e985 @justinfrench updating README with gem/plugin installation instructions
authored Mar 8, 2009
95
96 <pre>
e3f04f6 @justinfrench README installation instructions simlified and clarified to specific …
authored Sep 13, 2010
97 # Rails 3:
98 $ rails generate formtastic:install
99
100 # Or Rails 2:
101 $ ./script/generate formtastic
c89e985 @justinfrench updating README with gem/plugin installation instructions
authored Mar 8, 2009
102 </pre>
103
ebe4e51 @justinfrench updated the README to reflect the new gem versions and other compatib…
authored Sep 8, 2010
104
105 h2. Stylesheets
c89e985 @justinfrench updating README with gem/plugin installation instructions
authored Mar 8, 2009
106
127a6b9 @justinfrench Added a Formtastic::LayoutHelper with formtastic_stylesheets so that …
authored Jan 10, 2010
107 A proof-of-concept stylesheet is provided which you can include in your layout. Customization is best achieved by overriding these styles in an additional stylesheet so that the Formtastic styles can be updated without clobbering your changes. If you want to use these stylesheets, add both to your layout with this helper:
c89e985 @justinfrench updating README with gem/plugin installation instructions
authored Mar 8, 2009
108
5c1ce48 @justinfrench moved the stylesheets stuff up with installation
authored Oct 21, 2009
109 <pre>
127a6b9 @justinfrench Added a Formtastic::LayoutHelper with formtastic_stylesheets so that …
authored Jan 10, 2010
110 <head>
111 ...
112 <%= formtastic_stylesheet_link_tag %>
113 ...
114 </head>
5c1ce48 @justinfrench moved the stylesheets stuff up with installation
authored Oct 21, 2009
115 </pre>
2526d2c @justinfrench Going back to generators instead of Rake tasks for copying stylesheet…
authored Oct 11, 2009
116
4036e74 @justinfrench pruning and cleaning up the README, it's been a while
authored Jul 20, 2010
117
5018ed0 @justinfrench clarified the differences in Rails 2 and 3 ERB blocks, and some other…
authored Nov 5, 2010
118 h2. Syntax
119
120 *Please note:* Formtastic makes use of a lot of ERB blocks and currently supports both Rails 2 and Rails 3, which means the syntax in these examples will differ depending on which version of Rails you're using.
121
122 The difference is subtle, with most blocks in Rails 3 requiring the addition of an equals sign:
123
124 <pre>
125 <!-- Rails 2 -->
126 <% semantic_form_for @user do |form| %>
127 <% form.inputs do %>
128 ...
129 <% end %>
130 <% end %>
131
132 <!-- Rails 3 -->
133 <%= semantic_form_for @user do |form| %>
134 <%= form.inputs do %>
135 ...
136 <% end %>
137 <% end %>
138
139 This README is currently documenting the Rails 2 way only. If you're using Rails 3 and your forms aren't rendering everything as expected, try changing @<%@ to @<%=@.
140
141
9af5cc8 @justinfrench Big update and re-organization of the README:
authored Feb 28, 2009
142 h2. Usage
143
144 Forms are really boring to code... you want to get onto the good stuff as fast as possible.
145
6688887 @grimen More README-polishing.
grimen authored Oct 25, 2009
146 This renders a set of inputs (one for _most_ columns in the database table, and one for each ActiveRecord @belongs_to@-association), followed by a submit button:
9af5cc8 @justinfrench Big update and re-organization of the README:
authored Feb 28, 2009
147
148 <pre>
149 <% semantic_form_for @user do |form| %>
150 <%= form.inputs %>
151 <%= form.buttons %>
152 <% end %>
153 </pre>
154
5018ed0 @justinfrench clarified the differences in Rails 2 and 3 ERB blocks, and some other…
authored Nov 5, 2010
155 This is a great way to get something up fast, but like scaffolding, it's not recommended for production.
156
157 You probably want to specify the order of the fields, skip some of the fields or even add in fields that Formtastic couldn't detect, you can pass in a list of field names to @inputs@ and list of button names to @buttons@:
9af5cc8 @justinfrench Big update and re-organization of the README:
authored Feb 28, 2009
158
159 <pre>
160 <% semantic_form_for @user do |form| %>
161 <%= form.inputs :title, :body, :section, :categories, :created_at %>
162 <%= form.buttons :commit %>
163 <% end %>
164 </pre>
165
5018ed0 @justinfrench clarified the differences in Rails 2 and 3 ERB blocks, and some other…
authored Nov 5, 2010
166 You probably want control over the input type Formtastic uses for each field, you can expand the @inputs@ and @buttons@ blocks. This specifies the @:section@ input should be a set of radio buttons (rather than the default select box), and that the @:created_at@ field should be a string (rather than the default datetime selects):
9af5cc8 @justinfrench Big update and re-organization of the README:
authored Feb 28, 2009
167
168 <pre>
169 <% semantic_form_for @post do |form| %>
170 <% form.inputs do %>
171 <%= form.input :title %>
172 <%= form.input :body %>
173 <%= form.input :section, :as => :radio %>
174 <%= form.input :categories %>
175 <%= form.input :created_at, :as => :string %>
176 <% end %>
177 <% form.buttons do %>
178 <%= form.commit_button %>
179 <% end %>
180 <% end %>
181 </pre>
182
a45853c @justinfrench small README typo
authored Apr 19, 2009
183 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 Feb 28, 2009
184
185 <pre>
186 <% semantic_form_for @post do |form| %>
17f6668 @justinfrench Revert "This reverts commit 440bd2d."
authored Nov 21, 2009
187 <% form.inputs "Basic", :id => "basic" do %>
9af5cc8 @justinfrench Big update and re-organization of the README:
authored Feb 28, 2009
188 <%= form.input :title %>
189 <%= form.input :body %>
190 <% end %>
191 <% form.inputs :name => "Advanced Options", :id => "advanced" do %>
192 <%= form.input :slug, :label => "URL Title", :hint => "Created automatically if left blank", :required => false %>
193 <%= form.input :section, :as => :radio %>
d174db0 @asanghi change id_prefix to namespace; added documentation in README
asanghi authored Oct 24, 2010
194 <%= form.input :user, :label => "Author", :label_method => :full_name %>
9af5cc8 @justinfrench Big update and re-organization of the README:
authored Feb 28, 2009
195 <%= form.input :categories, :required => false %>
196 <%= form.input :created_at, :as => :string, :label => "Publication Date", :required => false %>
197 <% end %>
198 <% form.buttons do %>
199 <%= form.commit_button %>
200 <% end %>
201 <% end %>
202 </pre>
203
bcd3ba9 @justinfrench some README updates
authored Oct 26, 2010
204 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 Feb 28, 2009
205
206 <pre>
05ae54d @josevalim Fixed nested attributes example in README
josevalim authored Mar 22, 2009
207 <% semantic_form_for @post do |form| %>
208 <%= form.inputs :title, :body, :created_at %>
41a6754 @josevalim Another README fix.
josevalim authored Mar 24, 2009
209 <% form.semantic_fields_for :author do |author| %>
1fcc068 @grimen An effort to make the README somewhat more readable.
grimen authored Oct 25, 2009
210 <%= author.inputs :first_name, :last_name, :name => "Author" %>
41a6754 @josevalim Another README fix.
josevalim authored Mar 23, 2009
211 <% end %>
05ae54d @josevalim Fixed nested attributes example in README
josevalim authored Mar 22, 2009
212 <%= form.buttons %>
9997ce6 @josevalim Added more information about inputs :for in README.
josevalim authored Mar 7, 2009
213 <% end %>
214 </pre>
215
6fd1bd2 @justinfrench improving the documentation in README
authored Apr 19, 2009
216 Or the Formtastic way with the @:for@ option:
9997ce6 @josevalim Added more information about inputs :for in README.
josevalim authored Mar 7, 2009
217
218 <pre>
05ae54d @josevalim Fixed nested attributes example in README
josevalim authored Mar 22, 2009
219 <% semantic_form_for @post do |form| %>
220 <%= form.inputs :title, :body, :created_at %>
221 <%= form.inputs :first_name, :last_name, :for => :author, :name => "Author" %>
222 <%= form.buttons %>
9af5cc8 @justinfrench Big update and re-organization of the README:
authored Feb 28, 2009
223 <% end %>
224 </pre>
225
1fcc068 @grimen An effort to make the README somewhat more readable.
grimen authored Oct 25, 2009
226 When working in has many association, you can even supply @"%i"@ in your fieldset name that it will be properly interpolated with the child index. For example:
d5e3b0a @josevalim Added nested child nindex support.
josevalim authored Mar 24, 2009
227
228 <pre>
229 <% semantic_form_for @post do |form| %>
230 <%= form.inputs %>
231 <%= form.inputs :name => 'Category #%i', :for => :categories %>
232 <%= form.buttons %>
233 <% end %>
234 </pre>
235
d174db0 @asanghi change id_prefix to namespace; added documentation in README
asanghi authored Oct 24, 2010
236 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
237 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:
238
239 <pre>
240 <% semantic_form_for(@post, :namespace => 'cat_form') do |form| %>
241 <%= form.input :title %> # id="cat_form_post_title"
242 <%= form.input :body %> # id="cat_form_post_body"
243 <%= form.input :created_at %> # id="cat_form_post_created_at"
244 <%= form.buttons %>
245 <% end %>
246 </pre>
6fd1bd2 @justinfrench improving the documentation in README
authored Apr 19, 2009
247
29133e1 @dougireton Fixed minor typo in README Usage section.
dougireton authored Apr 28, 2010
248 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/autogrow textareas:
6fd1bd2 @justinfrench improving the documentation in README
authored Apr 19, 2009
249
250 <pre>
251 <% semantic_form_for @post do |form| %>
252 <%= form.input :title, :input_html => { :size => 60 } %>
253 <%= form.input :body, :input_html => { :class => 'autogrow' } %>
254 <%= form.input :created_at, :input_html => { :disabled => true } %>
255 <%= form.buttons %>
256 <% end %>
257 </pre>
258
259 The same can be done for buttons with the @:button_html@ option:
260
261 <pre>
262 <% semantic_form_for @post do |form| %>
263 ...
264 <% form.buttons do %>
265 <%= form.commit_button :button_html => { :class => "primary" } %>
266 <% end %>
267 <% end %>
268 </pre>
269
d174db0 @asanghi change id_prefix to namespace; added documentation in README
asanghi authored Oct 24, 2010
270 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 Oct 25, 2009
271
6fd1bd2 @justinfrench improving the documentation in README
authored Apr 19, 2009
272 <pre>
273 <% semantic_form_for @post do |form| %>
274 <%= form.input :title, :wrapper_html => { :class => "important" } %>
275 <%= form.input :body %>
276 <%= form.input :description, :wrapper_html => { :style => "display:none;" } %>
277 ...
278 <% end %>
279 </pre>
280
d174db0 @asanghi change id_prefix to namespace; added documentation in README
asanghi authored Oct 24, 2010
281 Customize the default class used for hints on each attribute or globally in the @config/formtastic.rb@ file. Similarly you can customize the error classes on an attribute level or globally.
282
283 <pre>
284 <% semantic_form_for @post do |form| %>
285 <%= form.input :title, :hint_class => 'custom-html-class', :error_class => 'custom-error-class' %>
286 <% end %>
287 </pre>
288
a92cf7c @justinfrench added documentation for :collection option, resolves #181
authored Mar 13, 2010
289 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:
290
291 <pre>
292 f.input :authors, :as => :check_boxes, :collection => User.find(:all, :order => "last_name ASC")
293 f.input :authors, :as => :check_boxes, :collection => current_user.company.users.active
294 f.input :authors, :as => :check_boxes, :collection => [@justin, @kate]
295 f.input :authors, :as => :check_boxes, :collection => ["Justin", "Kate", "Amelia", "Gus", "Meg"]
296 f.input :author, :as => :select, :collection => Author.find(:all)
297 f.input :author, :as => :select, :collection => { @justin.name => @justin.id, @kate.name => @kate.id }
298 f.input :author, :as => :select, :collection => ["Justin", "Kate", "Amelia", "Gus", "Meg"]
299 f.input :author, :as => :radio, :collection => User.find(:all)
300 f.input :author, :as => :radio, :collection => [@justin, @kate]
301 f.input :author, :as => :radio, :collection => { @justin.name => @justin.id, @kate.name => @kate.id }
302 f.input :author, :as => :radio, :collection => ["Justin", "Kate", "Amelia", "Gus", "Meg"]
303 f.input :admin, :as => :radio, :collection => ["Yes!", "No"]
304 </pre>
305
6fd1bd2 @justinfrench improving the documentation in README
authored Apr 19, 2009
306
5a39443 @justinfrench bulking up the documentation and readme with the different inputs ava…
authored Jun 28, 2008
307 h2. The Available Inputs
308
d9a06fe @grimen README: Last set of polishing moves for now.
grimen authored Oct 25, 2009
309 The Formtastic input types:
310
8577c18 @grimen More README-readability polishing.
grimen authored Oct 25, 2009
311 * @:select@ - a select menu. Default for ActiveRecord associations: @belongs_to@, @has_many@, and @has_and_belongs_to_many@.
312 * @:check_boxes@ - a set of check_box inputs. Alternative to @:select@ for ActiveRecord-associations: @has_many@, and @has_and_belongs_to_many@.
313 * @:radio@ - a set of radio inputs. Alternative to @:select@ for ActiveRecord-associations: @belongs_to@.
314 * @:time_zone@ - a select input. Default for column types: @:string@ with name matching @"time_zone"@.
315 * @:password@ - a password input. Default for column types: @:string@ with name matching @"password"@.
316 * @:text@ - a textarea. Default for column types: @:text@.
317 * @:date@ - a date select. Default for column types: @:date@.
318 * @:datetime@ - a date and time select. Default for column types: @:datetime@ and @:timestamp@.
319 * @:time@ - a time select. Default for column types: @:time@.
320 * @:boolean@ - a checkbox. Default for column types: @:boolean@.
321 * @:string@ - a text field. Default for column types: @:string@.
322 * @:numeric@ - a text field (just like string). Default for column types: @:integer@, @:float@, and @:decimal@.
323 * @: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.
324 * @: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 Oct 10, 2010
325 * @:email@ - a text field (just like string). Default for columns with name matching @"email"@. New in HTML5. Works on some mobile browsers already.
326 * @:url@ - a text field (just like string). Default for columns with name matching @"url"@. New in HTML5. Works on some mobile browsers already.
327 * @:phone@ - a text field (just like string). Default for columns with name matching @"phone"@ or @"fax"@. New in HTML5.
328 * @: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 Oct 25, 2009
329 * @:hidden@ - a hidden field. Creates a hidden field (added for compatibility).
330
fd23ef4 @justinfrench tiny README tweak
authored Mar 13, 2010
331 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.
332
5a39443 @justinfrench bulking up the documentation and readme with the different inputs ava…
authored Jun 28, 2008
333
06ff25d @lardawge Added section clarifying label lookup order.
lardawge authored Dec 10, 2009
334 h2. Delegation for label lookups
335
336 Formtastic decides which label to use in the following order:
337
338 <pre>
339 1. :label # :label => "Choose Title"
340 2. Formtastic i18n # if either :label => true || i18n_lookups_by_default = true (see Internationalization)
341 3. Activerecord i18n # if localization file found for the given attribute
342 4. label_str_method # if nothing provided this defaults to :humanize but can be set to a custom method
343 </pre>
344
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored Aug 3, 2009
345 h2. Internationalization (I18n)
346
49a18a5 @grimen README-update: I18n instructions are better structured, and easier to…
grimen authored Oct 25, 2009
347 h3. Basic Localization
71ef99f @justinfrench nuked the configuration copy/paste from the README, linked to the gen…
authored Oct 21, 2009
348
49a18a5 @grimen README-update: I18n instructions are better structured, and easier to…
grimen authored Oct 25, 2009
349 Formtastic got 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 Aug 2, 2009
350
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored Sep 16, 2009
351 Basic localization (labels only, with ActiveRecord):
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored Aug 2, 2009
352
353 <pre>
354 <% semantic_form_for @post do |form| %>
355 <%= form.input :title %> # => :label => I18n.t('activerecord.attributes.user.title') or 'Title'
356 <%= form.input :body %> # => :label => I18n.t('activerecord.attributes.user.body') or 'Body'
357 <%= form.input :section %> # => :label => I18n.t('activerecord.attributes.user.section') or 'Section'
358 <% end %>
359 </pre>
360
49a18a5 @grimen README-update: I18n instructions are better structured, and easier to…
grimen authored Oct 25, 2009
361 *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?
362
363 h3. Enhanced Localization (Formtastic I18n API)
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored Aug 2, 2009
364
d9a06fe @grimen README: Last set of polishing moves for now.
grimen authored Oct 25, 2009
365 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 Aug 2, 2009
366
49a18a5 @grimen README-update: I18n instructions are better structured, and easier to…
grimen authored Oct 25, 2009
367 *1. Enable I18n lookups by default (@config/initializers/formtastic.rb@):*
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored Aug 2, 2009
368
369 <pre>
370 Formtastic::SemanticFormBuilder.i18n_lookups_by_default = true
371 </pre>
372
49a18a5 @grimen README-update: I18n instructions are better structured, and easier to…
grimen authored Oct 25, 2009
373 *2. Add some cool label-translations/variants (@config/locale/en.yml@):*
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored Aug 2, 2009
374
375 <pre>
376 en:
377 formtastic:
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored Sep 16, 2009
378 titles:
379 post_details: "Post details"
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored Aug 2, 2009
380 labels:
381 post:
382 title: "Choose a title..."
383 body: "Write something..."
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored Sep 16, 2009
384 edit:
385 title: "Edit title"
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored Aug 2, 2009
386 hints:
387 post:
388 title: "Choose a good title for you post."
389 body: "Write something inspiring here."
4aca8cd @grimen New I18n-features:
grimen authored Oct 24, 2009
390 actions:
743b26b @yabawock Revert "Reverting two i18n patches pulled in from the rails3 branch w…
yabawock authored May 29, 2010
391 create: "Create my %{model}"
4aca8cd @grimen New I18n-features:
grimen authored Oct 24, 2009
392 update: "Save changes"
393 dummie: "Launch!"
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored Aug 2, 2009
394 </pre>
395
396 *Note:* We are using English here still, but you get the point.
397
49a18a5 @grimen README-update: I18n instructions are better structured, and easier to…
grimen authored Oct 25, 2009
398 *3. ...and now you'll get:*
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored Aug 2, 2009
399
400 <pre>
4aca8cd @grimen New I18n-features:
grimen authored Oct 24, 2009
401 <% semantic_form_for Post.new do |form| %>
a8e2f2e @justinfrench fix README examples missing form.x prefix for buttons and inputs
authored Nov 10, 2009
402 <% form.inputs do %>
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored Sep 16, 2009
403 <%= form.input :title %> # => :label => "Choose a title...", :hint => "Choose a good title for you post."
404 <%= form.input :body %> # => :label => "Write something...", :hint => "Write something inspiring here."
405 <%= form.input :section %> # => :label => I18n.t('activerecord.attributes.user.section') or 'Section'
406 <% end %>
a8e2f2e @justinfrench fix README examples missing form.x prefix for buttons and inputs
authored Nov 10, 2009
407 <% form.buttons do %>
743b26b @yabawock Revert "Reverting two i18n patches pulled in from the rails3 branch w…
yabawock authored May 29, 2010
408 <%= form.commit_button %> # => "Create my %{model}"
4aca8cd @grimen New I18n-features:
grimen authored Oct 24, 2009
409 <% end %>
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored Aug 2, 2009
410 <% end %>
411 </pre>
412
49a18a5 @grimen README-update: I18n instructions are better structured, and easier to…
grimen authored Oct 25, 2009
413 *4. Localized titles (a.k.a. legends):*
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored Sep 16, 2009
414
17f6668 @justinfrench Revert "This reverts commit 440bd2d."
authored Nov 21, 2009
415 _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 Sep 16, 2009
416
417 <pre>
418 <% semantic_form_for @post do |form| %>
17f6668 @justinfrench Revert "This reverts commit 440bd2d."
authored Nov 21, 2009
419 <% form.inputs :post_details do %> # => :title => "Post details"
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored Sep 16, 2009
420 # ...
421 <% end %>
422 # ...
423 <% end %>
424 </pre>
425
49a18a5 @grimen README-update: I18n instructions are better structured, and easier to…
grimen authored Oct 25, 2009
426 *5. Override I18n settings:*
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored Aug 2, 2009
427
428 <pre>
429 <% semantic_form_for @post do |form| %>
a8e2f2e @justinfrench fix README examples missing form.x prefix for buttons and inputs
authored Nov 10, 2009
430 <% form.inputs do %>
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored Sep 16, 2009
431 <%= form.input :title %> # => :label => "Choose a title...", :hint => "Choose a good title for you post."
432 <%= form.input :body, :hint => false %> # => :label => "Write something..."
433 <%= form.input :section, :label => 'Some section' %> # => :label => 'Some section'
434 <% end %>
a8e2f2e @justinfrench fix README examples missing form.x prefix for buttons and inputs
authored Nov 10, 2009
435 <% form.buttons do %>
4aca8cd @grimen New I18n-features:
grimen authored Oct 24, 2009
436 <%= form.commit_button :dummie %> # => "Launch!"
437 <% end %>
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored Aug 2, 2009
438 <% end %>
439 </pre>
440
441 If I18n-lookups is disabled, i.e.:
442
443 <pre>
444 Formtastic::SemanticFormBuilder.i18n_lookups_by_default = false
445 </pre>
446
447 ...then you can enable I18n within the forms instead:
448
449 <pre>
450 <% semantic_form_for @post do |form| %>
a8e2f2e @justinfrench fix README examples missing form.x prefix for buttons and inputs
authored Nov 10, 2009
451 <% form.inputs do %>
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored Sep 16, 2009
452 <%= form.input :title, :label => true %> # => :label => "Choose a title..."
453 <%= form.input :body, :label => true %> # => :label => "Write something..."
454 <%= form.input :section, :label => true %> # => :label => I18n.t('activerecord.attributes.user.section') or 'Section'
455 <% end %>
a8e2f2e @justinfrench fix README examples missing form.x prefix for buttons and inputs
authored Nov 10, 2009
456 <% form.buttons do %>
4b1ba5f @dbackeus Updated expected commit_button text in README.
dbackeus authored Nov 5, 2010
457 <%= form.commit_button true %> # => "Update %{model}" (if we are in edit that is...)
4aca8cd @grimen New I18n-features:
grimen authored Oct 24, 2009
458 <% end %>
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored Aug 2, 2009
459 <% end %>
460 </pre>
461
49a18a5 @grimen README-update: I18n instructions are better structured, and easier to…
grimen authored Oct 25, 2009
462 *6. Advanced I18n lookups*
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored Aug 2, 2009
463
464 For more flexible forms; Formtastic find translations using a bottom-up approach taking the following variables in account:
465
75782e1 @grimen Updated I18n-instructions in README; on the I18n-support for fieldset…
grimen authored Sep 16, 2009
466 * @MODEL@, e.g. "post"
467 * @ACTION@, e.g. "edit"
4aca8cd @grimen New I18n-features:
grimen authored Oct 24, 2009
468 * @KEY/ATTRIBUTE@, e.g. "title", :my_custom_key, ...
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored Aug 2, 2009
469
470 ...in the following order:
471
6688887 @grimen More README-polishing.
grimen authored Oct 25, 2009
472 1. @formtastic.{titles,labels,hints,actions}.MODEL.ACTION.ATTRIBUTE@ - by model and action
473 2. @formtastic.{titles,labels,hints,actions}.MODEL.ATTRIBUTE@ - by model
474 3. @formtastic.{titles,labels,hints,actions}.ATTRIBUTE@ - global default
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored Aug 2, 2009
475
476 ...which means that you can define translations like this:
477
478 <pre>
479 en:
480 formtastic:
481 labels:
482 title: "Title" # Default global value
483 article:
484 body: "Article content"
485 post:
486 new:
487 title: "Choose a title..."
488 body: "Write something..."
489 edit:
490 title: "Edit title"
491 body: "Edit body"
492 </pre>
493
4aca8cd @grimen New I18n-features:
grimen authored Oct 24, 2009
494 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 Sep 16, 2009
495
71ef99f @justinfrench nuked the configuration copy/paste from the README, linked to the gen…
authored Oct 21, 2009
496
c4ebcef * added semantic_errors method with specs
Wojciech Wnętrzak authored Dec 3, 2009
497 h2. Semantic errors
498
499 You can show errors on base (by default) and any other attribute just passing it name to semantic_errors method:
500
501 <pre>
502 <% semantic_form_for @post do |form| %>
503 <%= form.semantic_errors :state %>
504 <% end %>
505 </pre>
506
507
94ce3ec @grimen Documentation for the new I18n features for labels/hints.
grimen authored Aug 2, 2009
508 h2. ValidationReflection plugin
509
49a18a5 @grimen README-update: I18n instructions are better structured, and easier to…
grimen authored Oct 25, 2009
510 If you have the "ValidationReflection":http://github.com/redinger/validation_reflection plugin installed, you won't have to specify the @:required@ option (it checks the validations on the model instead).
5a39443 @justinfrench bulking up the documentation and readme with the different inputs ava…
authored Jun 28, 2008
511
512
71ef99f @justinfrench nuked the configuration copy/paste from the README, linked to the gen…
authored Oct 21, 2009
513 h2. Configuration
5a39443 @justinfrench bulking up the documentation and readme with the different inputs ava…
authored Jun 28, 2008
514
5f3d7a6 @justinfrench updated the generator docs in README to reflect both Rails 3 and 2
authored Sep 21, 2010
515 Run @rails generate formtastic:install@ (Rails 3) or @./script/generate formtastic@ (Rails 2) to copy a commented out config file into @config/initializers/formtastic.rb@. You can "view the configuration file on GitHub":http://github.com/justinfrench/formtastic/blob/master/generators/formtastic/templates/formtastic.rb
3a32b4a @josevalim Updated README with new configuration options.
josevalim authored Mar 4, 2009
516
5a39443 @justinfrench bulking up the documentation and readme with the different inputs ava…
authored Jun 28, 2008
517
fef3288 @grimen Added documentation for the form generator in README, and showing som…
grimen authored Nov 19, 2009
518 h2. Form Generator
519
5f3d7a6 @justinfrench updated the generator docs in README to reflect both Rails 3 and 2
authored Sep 21, 2010
520 There's a Formtastic form code generator to make your transition to Formtastic easier. All you have to do is to *specify an existing model name*, and optionally specify view template framework (ERB/HAML), and you are good to go. *Note:* This won't overwrite any of your stuff.
fef3288 @grimen Added documentation for the form generator in README, and showing som…
grimen authored Nov 19, 2009
521
5f3d7a6 @justinfrench updated the generator docs in README to reflect both Rails 3 and 2
authored Sep 21, 2010
522 h3. Basic usage
523
524 Rails 3:
fef3288 @grimen Added documentation for the form generator in README, and showing som…
grimen authored Nov 19, 2009
525
526 <pre>
5f3d7a6 @justinfrench updated the generator docs in README to reflect both Rails 3 and 2
authored Sep 21, 2010
527 $ rails generate formtastic:form ModelName
528 </pre>
fef3288 @grimen Added documentation for the form generator in README, and showing som…
grimen authored Nov 19, 2009
529
5f3d7a6 @justinfrench updated the generator docs in README to reflect both Rails 3 and 2
authored Sep 21, 2010
530 Rails 2:
531
532 <pre>
533 $ ./script/generate form ModelName
534 </pre>
fef3288 @grimen Added documentation for the form generator in README, and showing som…
grimen authored Nov 19, 2009
535
5f3d7a6 @justinfrench updated the generator docs in README to reflect both Rails 3 and 2
authored Sep 21, 2010
536 The results are something like this, with the ERB code printed out to the terminal
537
538 <pre>
539 $ rails generate formtastic:form Post
540 # ---------------------------------------------------------
541 # GENERATED FORMTASTIC CODE
542 # ---------------------------------------------------------
543
544 <% f.inputs do %>
545 <%= f.input :title, :label => 'Title' %>
546 <%= f.input :body, :label => 'Body' %>
547 <%= f.input :published, :label => 'Published' %>
548 <% end %>
549
550 # ---------------------------------------------------------
551 Copied to clipboard - just paste it!
fef3288 @grimen Added documentation for the form generator in README, and showing som…
grimen authored Nov 19, 2009
552 </pre>
553
5f3d7a6 @justinfrench updated the generator docs in README to reflect both Rails 3 and 2
authored Sep 21, 2010
554 h3. Generating a partial with @--partial@
555
556 You can also ask Formtastic to *generate a partial* with the @--partial@ option, placing it in the correct location inside your @app/views@ directory:
fef3288 @grimen Added documentation for the form generator in README, and showing som…
grimen authored Nov 19, 2009
557
558 <pre>
5f3d7a6 @justinfrench updated the generator docs in README to reflect both Rails 3 and 2
authored Sep 21, 2010
559 $ rails generate formastic:form Post --partial
fef3288 @grimen Added documentation for the form generator in README, and showing som…
grimen authored Nov 19, 2009
560 exists app/views/posts
561 create app/views/posts/_form.html.erb
562 </pre>
563
5f3d7a6 @justinfrench updated the generator docs in README to reflect both Rails 3 and 2
authored Sep 21, 2010
564 h3. Specifying HAML instead of ERB with @--haml@
3f58f3a @justinfrench README update for --controller option form generator
authored Dec 3, 2009
565
566 <pre>
5f3d7a6 @justinfrench updated the generator docs in README to reflect both Rails 3 and 2
authored Sep 21, 2010
567 $ rails generate formastic:form Post --haml
3f58f3a @justinfrench README update for --controller option form generator
authored Dec 2, 2009
568 exists app/views/admin/posts
569 create app/views/admin/posts/_form.html.haml
570 </pre>
571
5f3d7a6 @justinfrench updated the generator docs in README to reflect both Rails 3 and 2
authored Sep 21, 2010
572 h3. Specifying controller namespace with @--controller@
3f58f3a @justinfrench README update for --controller option form generator
authored Dec 2, 2009
573
574 <pre>
5f3d7a6 @justinfrench updated the generator docs in README to reflect both Rails 3 and 2
authored Sep 21, 2010
575 $ rails generate formastic:form Post --partial --controller admin/posts
3f58f3a @justinfrench README update for --controller option form generator
authored Dec 2, 2009
576 exists app/views/admin/posts
577 create app/views/admin/posts/_form.html.erb
578 </pre>
579
fef3288 @grimen Added documentation for the form generator in README, and showing som…
grimen authored Nov 19, 2009
580
ce7da5e @justinfrench added the builder config to the config template and quick documentati…
authored Nov 10, 2009
581 h2. Custom Inputs
582
583 If you want to add your own input types to encapsulate your own logic or interface patterns, you can do so by subclassing SemanticFormBuilder and configuring Formtastic to use your custom builder class.
584
585 @Formtastic::SemanticFormHelper.builder = MyCustomBuilder@
586
28bb57f @paneq Resolves http://github.com/justinfrench/formtastic/issues/#issue/409
paneq authored Nov 2, 2010
587 Be aware that you should either set the options on custom builder or require it after setting options on formtastic default builder.
ce7da5e @justinfrench added the builder config to the config template and quick documentati…
authored Nov 9, 2009
588
28bb57f @paneq Resolves http://github.com/justinfrench/formtastic/issues/#issue/409
paneq authored Nov 2, 2010
589 <pre>
153f4e8 @justinfrench Merge branch 'master' of http://github.com/paneq/formtastic into pane…
authored Nov 3, 2010
590 # OK
591 Formtastic::SemanticFormBuilder.i18n_lookups_by_default = true
592 require 'formtastic/my_custom_builder'
593 Formtastic::SemanticFormHelper.builder = Formtastic::MyCustomBuilder
594
595 # OK
596 require 'formtastic/my_custom_builder'
597 Formtastic::SemanticFormHelper.builder = Formtastic::MyCustomBuilder
598 Formtastic::MyCustomBuilder.i18n_lookups_by_default = true
599
600 # WRONG!
601 require 'formtastic/my_custom_builder'
602 Formtastic::SemanticFormBuilder.i18n_lookups_by_default = true
603 Formtastic::SemanticFormHelper.builder = Formtastic::MyCustomBuilder
28bb57f @paneq Resolves http://github.com/justinfrench/formtastic/issues/#issue/409
paneq authored Nov 2, 2010
604 </pre>
3f58f3a @justinfrench README update for --controller option form generator
authored Dec 2, 2009
605
5f3d7a6 @justinfrench updated the generator docs in README to reflect both Rails 3 and 2
authored Sep 21, 2010
606
2d2d813 @yabawock More intelligent way to html_escape labels and hints (GH-299)
yabawock authored Jul 12, 2010
607 h2. Security
ce7da5e @justinfrench added the builder config to the config template and quick documentati…
authored Nov 9, 2009
608
2d2d813 @yabawock More intelligent way to html_escape labels and hints (GH-299)
yabawock authored Jul 12, 2010
609 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:
610
611 Formtastic::SemanticFormBuilder.escape_html_entities_in_hints_and_labels = false
3f58f3a @justinfrench README update for --controller option form generator
authored Dec 2, 2009
612
613
9af5cc8 @justinfrench Big update and re-organization of the README:
authored Feb 28, 2009
614 h2. Dependencies
dcf8beb Initial Commit
Justin French authored Apr 7, 2008
615
9af5cc8 @justinfrench Big update and re-organization of the README:
authored Feb 28, 2009
616 There are none, but...
dcf8beb Initial Commit
Justin French authored Apr 7, 2008
617
e9f27cf @grimen The most tiny README-update ever. =)
grimen authored Nov 28, 2009
618 * if you have the "ValidationReflection":http://github.com/redinger/validation_reflection plugin is installed, you won't have to specify the @:required@ option (it checks the validations on the model instead).
1fcc068 @grimen An effort to make the README somewhat more readable.
grimen authored Oct 25, 2009
619 * if you want to use the @:country@ input, you'll need to install the "iso-3166-country-select plugin":http://github.com/rails/iso-3166-country-select (or any other country_select plugin with the same API).
620 * "rspec":http://github.com/dchelimsky/rspec/, "rspec_hpricot_matchers":http://rubyforge.org/projects/rspec-hpricot/ and "rcov":http://github.com/relevance/rcov gems (plus any of their own dependencies) are required for the test suite.
dcf8beb Initial Commit
Justin French authored Apr 7, 2008
621
0b370ba @justinfrench Renamed input_field_set() to just inputs() and added a shorthand vers…
authored Jan 6, 2009
622
9af5cc8 @justinfrench Big update and re-organization of the README:
authored Feb 28, 2009
623 h2. Compatibility
0b370ba @justinfrench Renamed input_field_set() to just inputs() and added a shorthand vers…
authored Jan 6, 2009
624
ebe4e51 @justinfrench updated the README to reflect the new gem versions and other compatib…
authored Sep 8, 2010
625 * We're only testing Formtastic with the latest Rails 2.x and 3.x stable releases. Patches are welcome to allow backwards compatibility with older versions of Rails, of course.
eab18fa @justinfrench prep README for 1.0
authored Aug 12, 2010
626 * Formtastic, much like Rails 2, is very ActiveRecord-centric. Many people are using Formtastic (especially the rails3 branch) successfully with other ActiveModel-like ORMs and classes (DataMapper, MongoMapper, Mongoid, Authlogic, Devise...) but we're not guaranteeing anything at this stage. Patches are welcome, but it's not our core focus right now.
4036e74 @justinfrench pruning and cleaning up the README, it's been a while
authored Jul 20, 2010
627
61d0056 @justinfrench * updated the status to reflect that this is a release candidate
authored Oct 21, 2009
628
2079c59 @justinfrench added a section about contributing to README
authored Jan 2, 2010
629 h2. How to contribute
630
4036e74 @justinfrench pruning and cleaning up the README, it's been a while
authored Jul 20, 2010
631 Please ensure that you provide appropriate spec/test coverage and ensure the documentation is up-to-date. Bonus points if you perform your changes in a clean topic branch rather than master, and if you create an issue on GH for us to discuss your changes. Pull requests tend to get lost.
2079c59 @justinfrench added a section about contributing to README
authored Jan 1, 2010
632
633 Please also keep your commits *atomic* so that they are more likely to apply cleanly. That means that each commit should contain the smallest possible logical change. Don't commit two features at once, don't update the gemspec at the same time you add a feature, don't fix a whole bunch of whitespace in a file at the same time you change a few lines, etc, etc.
634
635 For significant changes, you may wish to discuss your idea on the Formtastic Google group before coding to ensure that your change is likely to be accepted. Formtastic relies heavily on i18n, so if you're unsure of the impact this has on your changes, please discuss them with the group.
636
637
259a98c @justinfrench updated heading in README
authored Jan 2, 2010
638 h2. Maintainers & Contributors
83b9eb1 @justinfrench updated the contributors list
authored Apr 2, 2009
639
644d100 @yabawock Fix typo in Readme
yabawock authored Jul 22, 2010
640 Formtastic is maintained by "Justin French":http://github.com/justinfrench, "Morton Jonuschat":http://github.com/yabawock and "Gabriel Sobrinho":http://github.com/sobrinho. "Denis Major":http://github.com/denismajor1 is doing some amazing documentation work in the wiki, and we very much appreciate the past efforts of "José Valim":http://github.com/josevalim and "Jonas Grimfelt":http://github.com/grimen and over 40 other contributors.
619ce6c @justinfrench added Grimen to the README, updated contributors list, etc
authored Nov 10, 2009
641
642 @git shortlog -n -s --no-merges@
2d4a72b @justinfrench big update to the README
authored Feb 16, 2009
643
5af0311 @justinfrench updated the README to pimp the google group more
authored Apr 2, 2009
644
7a84a73 @justinfrench README heading tweak
authored Nov 10, 2009
645 h2. Google Group
5af0311 @justinfrench updated the README to pimp the google group more
authored Apr 2, 2009
646
647 Please join the "Formtastic Google Group":http://groups.google.com.au/group/formtastic, especially if you'd like to talk about a new feature, or report a bug.
648
649
ba3ce05 @justinfrench updated the README a little with contributors and some other busy work
authored Jun 27, 2008
650 h2. Project Info
651
1fcc068 @grimen An effort to make the README somewhat more readable.
grimen authored Oct 25, 2009
652 Formtastic is hosted on Github: "http://github.com/justinfrench/formtastic":http://github.com/justinfrench/formtastic, where your contributions, forkings, comments and feedback are greatly welcomed.
ba3ce05 @justinfrench updated the README a little with contributors and some other busy work
authored Jun 27, 2008
653
654
ebe4e51 @justinfrench updated the README to reflect the new gem versions and other compatib…
authored Sep 8, 2010
655 Copyright (c) 2007-2010 Justin French, released under the MIT license.
Something went wrong with that request. Please try again.