formtastic 2.1.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +7 -0
  2. data/.gitattributes +1 -0
  3. data/.github/workflows/test.yml +61 -0
  4. data/.gitignore +4 -2
  5. data/CHANGELOG.md +52 -0
  6. data/Gemfile +1 -1
  7. data/Gemfile.lock +105 -0
  8. data/MIT-LICENSE +1 -1
  9. data/{README.textile → README.md} +204 -219
  10. data/RELEASE_PROCESS +3 -1
  11. data/Rakefile +27 -29
  12. data/app/assets/stylesheets/formtastic.css +3 -2
  13. data/bin/appraisal +8 -0
  14. data/formtastic.gemspec +11 -14
  15. data/gemfiles/rails_5.2/Gemfile +5 -0
  16. data/gemfiles/rails_6.0/Gemfile +5 -0
  17. data/gemfiles/rails_6.1/Gemfile +5 -0
  18. data/gemfiles/rails_edge/Gemfile +13 -0
  19. data/lib/formtastic/action_class_finder.rb +18 -0
  20. data/lib/formtastic/actions/button_action.rb +55 -60
  21. data/lib/formtastic/actions/input_action.rb +59 -57
  22. data/lib/formtastic/actions/link_action.rb +68 -67
  23. data/lib/formtastic/actions.rb +6 -3
  24. data/lib/formtastic/deprecation.rb +5 -0
  25. data/lib/formtastic/engine.rb +3 -1
  26. data/lib/formtastic/form_builder.rb +35 -16
  27. data/lib/formtastic/helpers/action_helper.rb +34 -28
  28. data/lib/formtastic/helpers/enum.rb +13 -0
  29. data/lib/formtastic/helpers/errors_helper.rb +2 -2
  30. data/lib/formtastic/helpers/fieldset_wrapper.rb +16 -12
  31. data/lib/formtastic/helpers/form_helper.rb +19 -16
  32. data/lib/formtastic/helpers/input_helper.rb +69 -97
  33. data/lib/formtastic/helpers/inputs_helper.rb +35 -25
  34. data/lib/formtastic/helpers/reflection.rb +4 -4
  35. data/lib/formtastic/helpers.rb +1 -2
  36. data/lib/formtastic/html_attributes.rb +12 -1
  37. data/lib/formtastic/i18n.rb +1 -1
  38. data/lib/formtastic/input_class_finder.rb +18 -0
  39. data/lib/formtastic/inputs/base/choices.rb +2 -2
  40. data/lib/formtastic/inputs/base/collections.rb +46 -14
  41. data/lib/formtastic/inputs/base/database.rb +7 -2
  42. data/lib/formtastic/inputs/base/datetime_pickerish.rb +85 -0
  43. data/lib/formtastic/inputs/base/errors.rb +7 -7
  44. data/lib/formtastic/inputs/base/hints.rb +2 -2
  45. data/lib/formtastic/inputs/base/html.rb +10 -9
  46. data/lib/formtastic/inputs/base/labelling.rb +5 -8
  47. data/lib/formtastic/inputs/base/naming.rb +4 -4
  48. data/lib/formtastic/inputs/base/numeric.rb +1 -1
  49. data/lib/formtastic/inputs/base/options.rb +3 -4
  50. data/lib/formtastic/inputs/base/stringish.rb +10 -2
  51. data/lib/formtastic/inputs/base/timeish.rb +34 -22
  52. data/lib/formtastic/inputs/base/validations.rb +41 -13
  53. data/lib/formtastic/inputs/base/wrapping.rb +29 -26
  54. data/lib/formtastic/inputs/base.rb +22 -15
  55. data/lib/formtastic/inputs/boolean_input.rb +26 -12
  56. data/lib/formtastic/inputs/check_boxes_input.rb +39 -31
  57. data/lib/formtastic/inputs/color_input.rb +41 -0
  58. data/lib/formtastic/inputs/country_input.rb +24 -5
  59. data/lib/formtastic/inputs/datalist_input.rb +41 -0
  60. data/lib/formtastic/inputs/date_picker_input.rb +93 -0
  61. data/lib/formtastic/inputs/{date_input.rb → date_select_input.rb} +1 -1
  62. data/lib/formtastic/inputs/datetime_picker_input.rb +103 -0
  63. data/lib/formtastic/inputs/{datetime_input.rb → datetime_select_input.rb} +1 -1
  64. data/lib/formtastic/inputs/file_input.rb +2 -2
  65. data/lib/formtastic/inputs/hidden_input.rb +2 -6
  66. data/lib/formtastic/inputs/radio_input.rb +28 -22
  67. data/lib/formtastic/inputs/select_input.rb +36 -39
  68. data/lib/formtastic/inputs/time_picker_input.rb +99 -0
  69. data/lib/formtastic/inputs/{time_input.rb → time_select_input.rb} +6 -2
  70. data/lib/formtastic/inputs/time_zone_input.rb +16 -6
  71. data/lib/formtastic/inputs.rb +32 -21
  72. data/lib/formtastic/localized_string.rb +1 -1
  73. data/lib/formtastic/localizer.rb +24 -24
  74. data/lib/formtastic/namespaced_class_finder.rb +99 -0
  75. data/lib/formtastic/version.rb +1 -1
  76. data/lib/formtastic.rb +20 -10
  77. data/lib/generators/formtastic/form/form_generator.rb +10 -4
  78. data/lib/generators/formtastic/input/input_generator.rb +46 -0
  79. data/lib/generators/formtastic/install/install_generator.rb +5 -19
  80. data/lib/generators/templates/_form.html.slim +2 -2
  81. data/lib/generators/templates/formtastic.rb +46 -25
  82. data/lib/generators/templates/input.rb +19 -0
  83. data/sample/basic_inputs.html +23 -3
  84. data/script/integration-template.rb +74 -0
  85. data/script/integration.sh +19 -0
  86. data/spec/action_class_finder_spec.rb +12 -0
  87. data/spec/actions/button_action_spec.rb +8 -8
  88. data/spec/actions/generic_action_spec.rb +92 -56
  89. data/spec/actions/input_action_spec.rb +7 -7
  90. data/spec/actions/link_action_spec.rb +10 -10
  91. data/spec/builder/custom_builder_spec.rb +36 -20
  92. data/spec/builder/error_proc_spec.rb +4 -4
  93. data/spec/builder/semantic_fields_for_spec.rb +28 -29
  94. data/spec/fast_spec_helper.rb +12 -0
  95. data/spec/generators/formtastic/form/form_generator_spec.rb +45 -32
  96. data/spec/generators/formtastic/input/input_generator_spec.rb +124 -0
  97. data/spec/generators/formtastic/install/install_generator_spec.rb +9 -9
  98. data/spec/helpers/action_helper_spec.rb +75 -103
  99. data/spec/helpers/actions_helper_spec.rb +17 -17
  100. data/spec/helpers/form_helper_spec.rb +84 -33
  101. data/spec/helpers/input_helper_spec.rb +333 -285
  102. data/spec/helpers/inputs_helper_spec.rb +167 -121
  103. data/spec/helpers/reflection_helper_spec.rb +3 -3
  104. data/spec/helpers/semantic_errors_helper_spec.rb +23 -23
  105. data/spec/i18n_spec.rb +26 -26
  106. data/spec/input_class_finder_spec.rb +10 -0
  107. data/spec/inputs/base/collections_spec.rb +76 -0
  108. data/spec/inputs/base/validations_spec.rb +480 -0
  109. data/spec/inputs/boolean_input_spec.rb +100 -65
  110. data/spec/inputs/check_boxes_input_spec.rb +200 -101
  111. data/spec/inputs/color_input_spec.rb +85 -0
  112. data/spec/inputs/country_input_spec.rb +20 -20
  113. data/spec/inputs/custom_input_spec.rb +3 -4
  114. data/spec/inputs/datalist_input_spec.rb +61 -0
  115. data/spec/inputs/date_picker_input_spec.rb +449 -0
  116. data/spec/inputs/date_select_input_spec.rb +249 -0
  117. data/spec/inputs/datetime_picker_input_spec.rb +490 -0
  118. data/spec/inputs/datetime_select_input_spec.rb +209 -0
  119. data/spec/inputs/email_input_spec.rb +5 -5
  120. data/spec/inputs/file_input_spec.rb +6 -6
  121. data/spec/inputs/hidden_input_spec.rb +22 -35
  122. data/spec/inputs/include_blank_spec.rb +11 -11
  123. data/spec/inputs/label_spec.rb +62 -25
  124. data/spec/inputs/number_input_spec.rb +112 -112
  125. data/spec/inputs/password_input_spec.rb +5 -5
  126. data/spec/inputs/phone_input_spec.rb +5 -5
  127. data/spec/inputs/placeholder_spec.rb +6 -6
  128. data/spec/inputs/radio_input_spec.rb +99 -55
  129. data/spec/inputs/range_input_spec.rb +66 -66
  130. data/spec/inputs/readonly_spec.rb +50 -0
  131. data/spec/inputs/search_input_spec.rb +5 -5
  132. data/spec/inputs/select_input_spec.rb +170 -170
  133. data/spec/inputs/string_input_spec.rb +68 -16
  134. data/spec/inputs/text_input_spec.rb +16 -16
  135. data/spec/inputs/time_picker_input_spec.rb +455 -0
  136. data/spec/inputs/time_select_input_spec.rb +261 -0
  137. data/spec/inputs/time_zone_input_spec.rb +54 -28
  138. data/spec/inputs/url_input_spec.rb +5 -5
  139. data/spec/inputs/with_options_spec.rb +7 -7
  140. data/spec/localizer_spec.rb +39 -17
  141. data/spec/namespaced_class_finder_spec.rb +79 -0
  142. data/spec/schema.rb +21 -0
  143. data/spec/spec_helper.rb +254 -221
  144. data/spec/support/custom_macros.rb +128 -95
  145. data/spec/support/shared_examples.rb +12 -0
  146. data/spec/support/specialized_class_finder_shared_example.rb +27 -0
  147. data/spec/support/test_environment.rb +26 -10
  148. metadata +177 -238
  149. data/.travis.yml +0 -8
  150. data/Appraisals +0 -11
  151. data/CHANGELOG +0 -371
  152. data/gemfiles/rails-3.0.gemfile +0 -7
  153. data/gemfiles/rails-3.1.gemfile +0 -7
  154. data/gemfiles/rails-3.2.gemfile +0 -7
  155. data/lib/formtastic/helpers/buttons_helper.rb +0 -310
  156. data/lib/formtastic/inputs/base/grouped_collections.rb +0 -77
  157. data/lib/formtastic/util.rb +0 -25
  158. data/lib/tasks/verify_rcov.rb +0 -44
  159. data/spec/helpers/buttons_helper_spec.rb +0 -166
  160. data/spec/helpers/commit_button_helper_spec.rb +0 -530
  161. data/spec/inputs/date_input_spec.rb +0 -227
  162. data/spec/inputs/datetime_input_spec.rb +0 -185
  163. data/spec/inputs/time_input_spec.rb +0 -267
  164. data/spec/support/deferred_garbage_collection.rb +0 -21
data/CHANGELOG DELETED
@@ -1,371 +0,0 @@
1
- 2.1.0.rc
2
-
3
- * documentation improvements
4
- * improved performance by caching of Formtastic's i18n lookups
5
- * improved performance in production by checking for defined constants instead of catching the exception
6
- * fixed arguments passed into fields_for being flattened one level too deep
7
- * added an optional `index` that an inputs() block can access for use in labels and other HTML attributes
8
-
9
- 2.1.0.beta
10
-
11
- * Added Rails 3.2 compatibility
12
- * Added a new Actions DSL (f.actions, f.action) — see below for deprecation of the Buttons DSL
13
- * Added new i18n_localizer configuration, allowing you to use your own localiser class instead of Formtastic::Localizer
14
- * Added a hidden input before mutli-selects, to allow full clearing of the select (like we do for checkboxes)
15
- * Added support for integers in a :collection for radio and check_boxes inputs
16
- * Added support for time inputs with no current value to default render blank inputs rather than pre-selecting the current time
17
- * Brought back the Form Generator from 1.2.x versions of Formtastic
18
- * Added support for placeholder text on textareas (text inputs)
19
- * Deprecated the Buttons DSL (f.buttons, f.commit_button) in favor of the new Actions DSL — see above
20
- * Removed the previously deprecated :label_method, :value_method & :group_label_method options
21
- * Removed the previously deprecated :as => :numeric
22
- * Removed the previously deprecated inline_errors_for and related methods
23
- * Removed the previously deprecated SemanticFormHelper and SemanticFormBuilder
24
- * Fixed the behavior of :include_blank and :prompt options to be inline with Rails’
25
- * Fixed that :input_html => { :multiple => true } did not force a single choice select into a multi choice
26
- * Fixed date, time and datetime legend labels to correspond to the first visible input, rather than the first input (which may be hidden)
27
- * Fixed that DateInput should treat fragments excluded from :order option as discarded
28
- * Fixed that the :wrapper_html options could not be reused in the view (like in a with_options block) because they were modified by Formtastic
29
- * Fixed numerous Mongoid and MongoMapper compatibility issues
30
- * Fixed that we should be calculating the length of integer columns as bytes
31
- * Fixed many inputs (date, datetime, time, checkboxes, select & boolean) that did not correctly use the :index option in fields_for
32
- * Fixed Haml and Slim template indentation
33
- * Fixed invalid html output for nested inputs with multiple siblings
34
- * Fixed i18n keys with nested objects
35
- * Many documentation fixes and improvements
36
- * A few performance improvements
37
-
38
- 2.0.2
39
-
40
- * Fixed that MongoMapper does not use `associations(method)`. `.associations` is an accessor.
41
-
42
- 2.0.1
43
-
44
- * fixed that `:multiple => true` wasn't working when no association present
45
-
46
- 2.0.0
47
-
48
- * Fixed that all check boxes were incorrectly checked if an Array was passed in to :collection
49
- * Improved README
50
- * Added form generator template for Slim template engine
51
- * Added support for Proc conditions in collection_from_association
52
- * Refactored commit button. Split it into a couple of different methods to make it easier to override.
53
-
54
- 2.0.0.rc5
55
-
56
- * Changed perform_browser_validations and use_required_attribute configuration defaults from true to false for a better out-of-the-box experience and upgrade path
57
- * Fixed that the `novalidate` attribute was being applied to the `<form>` tag when it shouldn't have been (and vice-versa)
58
- * Fixed `undefined method `last' for #<Classname>` with a `:collection` containing an array of arrays
59
-
60
- 2.0.0.rc4
61
-
62
- * Fixed that TimeInput was not rendering hidden y/m/d inputs by default.
63
- * Fixed test suite under Rails 3.1.0.rc5
64
- * Fixed false and blank fragment labels on date/time inputs producing unsafe HTML.
65
- * Fixed that inputs were 'required' withput considering `:on => :create` validations
66
- * Fixed that collections of strings in CheckBoxesInput were ot being correctly checked be checked if they match the model
67
- * Fixed that the required attribute was added to the choices in a :radio or :check_boxes input, instead of just the parent input wrapper
68
- * Fixed semantic_fields_for when used with a hash-like model
69
- * Fixed that models without defined validations (even if validators_on exists) should not be considered required
70
- * Fixed min/max attributes when the validation uses a Proc
71
- * Fixed that inputs should not be considered required if :allow_blank => true is set on validates_inclusion_of
72
- * Fixed that inputs should not be considered required if if either :allow_blank => true, :minimum is > 0, or :within's least value is > 0 is set on validates_length_of
73
- * Fixed a typo in the config template
74
- * Fixed semantic_fields_for to work with Rails 3 *and* 3.1's method sigs (I hope), many thanks to the simple_form guys for figuring this out
75
- * Changed HTML5 `step` attribute to default to "any" instead of "1"
76
- * Added CarrierWave support for to file input detection
77
- * Added a configuration 'perform_browser_validations' to opt out of HTML5 browser validations.
78
- * Added more support for mongo documents, including MongoMapper-specific reflection capability
79
- * Added IE specific stylesheets & moved those styles out of main stylesheet, include them yourself if needed
80
- * Added a new configuration to opt out of HTML5 required attribute
81
-
82
- 2.0.0.rc3
83
-
84
- * Fixed that .label class was incorrectly applied to <label> tags inside a .choice on radio and checkbox inputs (#599)
85
-
86
- 2.0.0.rc2
87
-
88
- * Fixed install instructions in readme to reflect 2.0.0.rc1
89
- * Fixed that the checkbox was mistakenly placed after the label text in BooleanInput, not before it as per 1.x (#591)
90
- * Fixed that select inputs had two "blank" options at the top in some cases (#590)
91
- * Added documentation for Timeish inputs (date, datetime, time) (#589)
92
-
93
- 2.0.0.rc1
94
-
95
- * Removed the "inline_order" configuration (redefine input_wrapping instead)
96
- * Removed the "special" implementation of label() from FormBuilder, so builder.label will call Rails' label helper, not ours
97
- * Changed the HTML id attribute used for hidden inputs to be consistent with all other inputs
98
- * Changed formtastic:form generator include the wrapping semantic_form_for block
99
- * Changed formtastic:form generator to generate a partial by default (instead of copying to clipboard, which can be done with --copy)
100
- * Removed formtastic_stylesheet_link_tag
101
- * Improved some documentation, much more to come
102
- * Tagged many modules as @private to remove from YARD documentation
103
- * Added YARD as development dependency for a massive documentation effort
104
- * Renamed Formtastic::SemanticFormHelper to Formtastic::Helpers::FormHelper (SemanticFormHelper still exists as a module which includes the new module, need to handle deprecation notices somehow)
105
- * Renamed Formtastic::SemanticFormBuilder to Formtastic::FormBuilder (SemanticFormBuilder still exists as a subclass, need to handle deprecation notices somehow)
106
- * Massive refactoring of formtastic.rb into around 30 files and modules like StringInput and ButtonsHelper
107
- * Removed chunks of Rails 2 specific code, tests and documentation
108
- * Added support for HTML5 required attribute on input, select and textarea tags
109
- * Added support for HTML5 min/max/step attributes on NumericInput
110
- * Added support for HTML5 placeholder attributes on Stringish inputs (string, email, phone, url, search, number, password)
111
- * Added support for HTML5 autofocus attributes
112
- * Changed nested inputs() blocks to be automatically wrapped in an `<li>` tag to preserve HTML validity
113
- * Changed quick forms to skip polymorphic associations (they didn't work)
114
- * Changed short hand forms to raise an error when trying to render an input for a polymorphic association (it didn't work, need a collection)
115
- * Changed input() to raise an error when a :collection is not provided for a polymorphic association (we can't guess which class to use)
116
- * Removed semantic_remote_form_for etc, the remote_form_for helpers don't exist in Rails 3
117
- * Changed :label_method option to :member_label (with backwards compat and deprecation warnings)
118
- * Changed :value_method option to :member_value (with backwards compat and deprecation warnings)
119
- * Changed :grouped_label_method option to :grouped_label (with backwards compat and deprecation warnings)
120
- * Added support for a Method objects to :member_label/:member_value (aka :label_method/:value_method)
121
- * Improved support for Mongoid
122
- * Changed Rails dependency from ~> 3.0.0 to ~> 3.0 to allow experimentation with Rails 3.1 betas
123
- * Removed some overly eager CSS resets on form elements that made Opera and FF inputs look pretty ugly
124
- * Removed specificity and duplication in CSS
125
- * Added many new classes to DOM elements to enable more efficient and descriptive CSS
126
- * Improved visual/spacing consistency in checkboxes
127
- * Added non-standard zoom:1; to clearfixes to support IE better
128
- * Changed CSS coding style to multi-line so we can annotate the styles better
129
- * Fixed that overly specific CSS rules weren't applied to nested form elements properly
130
- * Removed formtastic:form generator and changed formtastic:install generator
131
- to override scaffold generator
132
- * Refactored and consolidated CSS by adding extra class names into the mark-up, preferring to style by class instead of element wherever possible
133
- * Added IE6 and IE7 stylesheets for specific fixes if needed (uncomplicates formtastic.css)
134
- * Added support for Rails 3.1 asset pipeline as well as previous generated CSS for Rails < 3.1
135
- * Made many subtle visual improvements to CSS, especially in IE
136
-
137
- 1.2.4
138
-
139
- * no changes
140
-
141
- 1.2.4.beta2
142
-
143
- * Changed :boolean inputs to use Rails' check_box_checked? instead of our own logic
144
- * Changed developer instructions in README
145
- * Fixed :boolean inputs to disable the included hidden input when disabling the actual checkbox
146
- * Fixed that Formtastic was making changes to the options hash directly instead of on a duplicate, causing problems for those trying to reuse options on multiple inputs in the view
147
- * Fixed that tiny scroll bars were appearing on legends in date/time/radio/cbheckboxes fielsets (GH-477)
148
- * Fixed an issue when formtastic fails to determine if a checkbox is checked with custom checked and unchecked values (thanks to Eugene Bolshakov)
149
- * Fixed that the hidden input rendered with a boolean checkbox did nt use the custom :name from :input_html options hash
150
- * Fixed issue where Firefox 4 gives focus to the <li> wrapper (fixes #524).
151
- * Fixed that a shared input options hash could not be re-used in the view without being altered by each input
152
- * Improved compatibility with Mongoid Documents
153
- * Updated i18n dependency to ~> 0.4
154
-
155
- 1.2.4.beta
156
-
157
- * Changed :boolean inputs to use Rails' check_box_checked? instead of our own logic
158
- * Changed developer instructions in README
159
- * Fixed :boolean inputs to disable the included hidden input when disabling the actual checkbox
160
- * Fixed that Formtastic was making changes to the options hash directly instead of on a duplicate, causing problems for those trying to reuse options on multiple inputs in the view
161
- * Fixed that tiny scroll bars were appearing on legends in date/time/radio/cbheckboxes fielsets (GH-477)
162
- * Fixed an issue when formtastic fails to determine if a checkbox is checked with custom checked and unchecked values (thanks to Eugene Bolshakov)
163
- * Fixed that the hidden input rendered with a boolean checkbox did nt use the custom :name from :input_html options hash
164
-
165
- 1.2.3
166
-
167
- * Removed deprecated methods input_field_set, button_field_set, boolean_select_input, boolean_radio_input and boolean_radio_input
168
- * Removed deprecated :class option on commit_button (use :input_html instead)
169
- * Fixed that stylesheets and initializers directories would be removed on uninstalling
170
- * Fixed some documentation and formatting
171
- * Fixed test coverage issues under Ruby 192 and Rails 2
172
- * Fixed that input_html options were not being passed down to checkbox tags
173
- * Changed internal duplication of the options hash so that the same options hash can be re-used over multiple inputs without being altered
174
- * Changed internal configuration to use class_attribute when available (Rails 3) to avoid deprecation warnings
175
- * Added Rails 3 compatible form generator templates in addition to existing Rails 2 support
176
- * Added reflection on allow_blank option when determining the 'required' status of an input
177
-
178
-
179
- 1.2.2
180
-
181
- * Removed deprecated aliased input names (:as => :boolean_select, :as => :boolean_radio_input
182
- * Removed deprecated aliased method names (input_field_set, button_field_set)
183
- * Removed deprecated :class => 'whatever' on commit_button
184
- * Fixed that classes in :button_html were being merged into :wrapper_html
185
- * Fixed that :include_blank was being ignored (always false) for multi selects
186
- * Fixed that we should reflect on allow_blank option to determine required status with validates_inclusion_of
187
- * Added the ability to pass :input_html options be passed to the checkbox on a boolean input
188
- * Developers: Added bundler support to for developer/contribution
189
- * Developers: Fixed spec coverage under Rails 2 and Ruby 1.9.2
190
-
191
- 1.2.1
192
-
193
- * test suite compatibilities with Rails 3.0.3
194
-
195
- 1.2.1.beta3
196
-
197
- * Fixed bad merge related to :boolean inputs in 1.2.1.beta
198
-
199
- 1.2.1.beta2
200
-
201
- * Fixed typos in gemspec post-install message
202
-
203
- 1.2.1.beta
204
-
205
- * Fixed that unchecking :boolean inputs would not send the correct params (and not persist the change the the DB)
206
- * Fixed that :boolean inputs checked state was not reflecting the database/model value
207
- * Fixed that init.rb and rails/init.rb were not included in the gem (affecting Rails 2)
208
-
209
- 1.2.0
210
-
211
- * Changed default_text_area_width to nil, overlooked in recent CSS/width changes
212
- * Improved documentation
213
-
214
- 1.2.0.beta2
215
-
216
- * Added :wrapper_html functionality to commit_button() to match what input() does
217
- * Deprecated the :class option on commit_button(), use :wrapper_html instead
218
- * Added hpricot as missing development dependency
219
- * Improved documentation
220
-
221
- 1.2.0.beta
222
-
223
- * New Stuff
224
-
225
- * Added support for Paperclip's questionable use of multiple error keys on a single attribute, so errors on Paperclip :file inputs Just Work
226
- * Added ability for the error and hint class to be overridden with :hint_class and :error_class, and configurable defaults app-wide
227
- * Added basic support for multiple forms in the same document by allowing the element ids to be prefixed with the :namespace option on semantic_form_for
228
- * Added a fallback to Rails' helpers.label key if Formtastic label translation are not found
229
- * Added support for default_text_area_width
230
- * Added support for #persisted? over #new_record? (ActiveModel)
231
- * Added the 'required' logic to attributes with validates_inclusion_of validation, in addition to validates_presence_of
232
- * Added new HTML5 :as => :email input (Rails 3)
233
- * Added new HTML5 :as => :phone input (Rails 3)
234
- * Added new HTML5 :as => :search input (Rails 3)
235
- * Added new HTML5 :as => :url input (Rails 3)
236
- * Added the ability for the :collection option to accept a string of HTML (like the output from grouped_options_for_select), rather than just Arrays, Hashes, collections, etc.
237
- * Added the ability to set your own form class, instead of 'formtastic'
238
- * Added maxlength attributes to inputs if it can be determined via the ValidationReflection plugin or ActiveModel validation reflections
239
- * Added the ability to override the form class (Post => "post") through an :as option on semantic_form_for option
240
- * Added the ability to customize the order for specific types of inputs. This is configured on a type basis and if a type is not found it willfall back to the default order as defined by @@inline_order
241
- * Added :first as a new rendering choice for the errors on each input
242
- * Added custom_inline_order to allow inline ordering per input type
243
- * Added the ability to override the generator templates in Rails 3
244
-
245
- * Fixes
246
-
247
- * Fixed invalid HTML generated by Rails' hidden inputs on checkboxes (by rendering our own hidden tag in a more deliberate place)
248
- * Fixed a bunch of invalid i18n key defaults
249
- * Fixed that 'required' classes and logic were not being applied to :check_boxes and :radio inputs
250
- * Fixed CSS bugs around Firefox's quirks with form elements that resulted in overflow/scroll bar issues
251
- * Fixed that errors on fields with association were not marking the wrapping tag with the error class
252
- * Fixed CSS where FF was displaying extra scroll bars on .check_boxes and .radio inputs (and the choices within them)
253
-
254
- * Changes
255
-
256
- * Changed that we were defaulting to a :select input for columns ending in _id, instead of columns with an appropriate associations
257
- * Deprecated a bunch of aliased method names that should no longer be used
258
- * Removed deprecated :selected, :checked and :default options
259
- * Changed the width styling for string, numeric, password and other basic inputs, defaults to 75% unless the size attribute is present
260
- * Changed string, numeric, password and other basic inputs' default text field size config to nil instead of 50, meaning the size attribute will be ommitted from most inputs, makeing styling easier, and custom sizes with the size attribute more deliberate
261
- * Changed string, numeric, password and other basic inputs to no longer add the size attribute based on column information (the default config is applied, unless it's nil)
262
- * Changed text input css behaviour updated to be similar to string etc
263
- * Changed text inputs to no longer include a default cols attribute, specify it with :input_html if you need it, but the value we were using was useless... also beefed up spec coverage
264
- * Removed :label calls from the generated ERB in the form generator (i18n is preferred)
265
- * Changed that :select inputs for HABTM associations would ignore the :include_blank option
266
- * Changed the default method on collections from Model.find(:all) to Model.all
267
- * Removed the deprecated formtastic_stylesheets generator
268
- * Changed the minimum Rails version to 2.3.7, which the earliest version which the specs pass with
269
- * Changed :password inputs to be sized by percentage (like other string-ish inputs), rather then em-based
270
-
271
- 1.1.0
272
-
273
- * documentation changes only
274
-
275
- 1.1.0.beta [Specs passed against Rails 2.3.8, 3.0.0.rc & 3.0.0]
276
-
277
- * Changed semantic_remote_form_for to allow for unobstrusive javascript / :remote option (rails3)
278
- * Changed spec_helper to support Rails 2 with RSpec or Rails 3 with RSpec 2 environments
279
- * Changed Rakefile to initalize the correct testing framework for the enviroment
280
- * Changed i18n dependency to >= 0.4
281
- * Fixed use of model_name.human instead of model_name.human_name (rails3)
282
- * Fixed use of deprecated Errors#on_base
283
- * Fixed use of ActionController::RecordIdentifier#singular_class_name (rails3)
284
- * Added railtie to perform initialization tasks after the rails framework is available (rails3)
285
- * Added compatible install and form helpers (rails3)
286
- * Added support for ActiveModel Validations, thanks to Guillaume Belleguic (rails3)
287
-
288
- 1.0.1
289
-
290
- * fixed "already initialised constant" warnings on boot
291
-
292
- 1.0.0
293
-
294
- * nothing changed from rc2
295
-
296
- 1.0.0.rc2
297
-
298
- * Fixed that :label=>false didn't disable the label on checkboxes/radiobuttons (#331)
299
- * Added full support of :input_html options for hidden fields
300
-
301
- 1.0.0.rc
302
-
303
- * Fixed that :checked_value and :unchecked_value options were being passed down into the HTML tags as attributes
304
-
305
- 1.0.0.beta4
306
-
307
- * ensure i18n < 0.4 is listed as a dependency in the gemspec
308
-
309
- 1.0.0.beta3
310
-
311
- * Added :ignore_date option to time inputs (#308)
312
- * Fixed inputs_for_nested_attributes returning out of the proc on has_many associated nested models.
313
- * Fixed with_custom_field_error_proc to use ensure for restoring default field_error_proc and to store it in a local variable instead of in a class variable (nested calls were problematic due to the globalness of class variables)
314
-
315
- 1.0.0.beta2
316
-
317
- * Added default escaping of html entities in labels and hints (#292, #299)
318
- * Added/Fixed that :value_method and :label_method were not being used for simple collections (like Arrays)
319
- * Added some more compatibility for Mongooid and other ORMs by checking for reflection information before calling it
320
- * Fixed deprecation warnings in Rails 2.3.6 and newer
321
- * Fixed a bug where :check_boxes and :radio were using method instead of :label option
322
- * Fixed a conflict where i18n lookups were failing when an attribute and model have the same name
323
- * Fixed some html that was not marked as safe
324
-
325
- 1.0.0.beta
326
-
327
- * Fixed :radio and :check_boxes inputs so that the legend no longer includes a <label> with a `for` attribute pointing to an input that doesn't exist (#253)
328
- * Fixed that some inputs had invalid 'find_options' attribute (#262)
329
- * Fixed that we were calling html_safe! when it was not always available
330
- * Added the ability for :input_html to now accept an option of :size => nil, to exclude the :size attribute altogether (#267)
331
-
332
- 0.9.10
333
-
334
- * Fixed i18n incompatibility with Rails 2.3.8 by reverting two i18n patches pulled in from the rails3 branch
335
-
336
- 0.9.9
337
-
338
- * Changed date/time inputs to default to nil instead of Time.now when the object has no value (due to deprecation warning, #240)
339
- * Changed the behaviour of associations with a :class_name option to be more consistent with what Rails expects
340
- * Fixed issues relating to Rails 2.3.6 automatically escaping ERB
341
- * Fixed issues with Ruby 1.9.1 and Haml
342
- * Fixed use of deprecated {{key}} syntax in i18n interpolation (thanks to Hans Petter Wilhelmsen)
343
- * Added the :disabled option to check_boxes input
344
- * Added translation support for nested models (thanks to Toni Tuominen)
345
-
346
- 0.9.8
347
-
348
- * Deprecated :selected/:checked options, see http://wiki.github.com/justinfrench/formtastic/deprecation-of-selected-option
349
- * Changed CSS rules for fieldset lists to be more specific
350
- * Changed that radio and checkbox inputs used to associate the legend label with the first choice's input (#101)
351
- * Changed the generators to use |f| rather than |form| (#151)
352
- * Changed the behaviour of :selected/:checked options to address several bugs and inconsistencies (#152)
353
- * Changed CSS for input width property to max-width, allowing a size attribute to still be set
354
- * Fixed an issue where label_str_method not honoured if the object is an ActiveRecord object
355
- * Fixed incorrect html class for namespaced objects ("/" replaced with "_")
356
- * Fixed compatibility issue with SearchLogic (#155)
357
- * Fixed an issue where label_str_method was not being overridden with i18n
358
- * Fixed a button text issue with Rails 2.x in which human_name on multi-word models returned one word (eg Ticketrequest) (#153)
359
- * Fixed the behaviour of select inputs when the belongs_to or has_many association has a special :class_name option
360
- * Fixed line numbers from eval'd code, to help when debugging
361
- * Fixed CSS issue that hidden fields were not always hidden (Chrome for example) (#209)
362
- * Fixed and improved CSS with nested fieldsets and legends
363
- * Fixed date/time inputs where :include_seconds => true
364
- * Fixed that inline hints were still being rendered on hidden inputs
365
- * Fixed broken CSS declaration missing a colon
366
- * Added configuration preferences for row and column attributes on textareas
367
- * Added semantic_errors helper and CSS (for all errors on an object)
368
- * Added :filename to the list of @@file_methods, to support carrierwave plugin (#156)
369
- * Added a Formtastic::LayoutHelper with formtastic_stylesheets helper method for linking to all Formtastic CSS files
370
- * Added labels option to date/time/datetime fields to customise the label of each part of the set (year, month, etc)
371
- * Added many improvements to the README and docs
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source :rubygems
4
-
5
- gem "rails", "~> 3.0.0"
6
-
7
- gemspec :path=>"../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source :rubygems
4
-
5
- gem "rails", "~> 3.1.0"
6
-
7
- gemspec :path=>"../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source :rubygems
4
-
5
- gem "rails", "~> 3.2.0"
6
-
7
- gemspec :path=>"../"