CHANGELOG 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. 2.1.1
  2. * Documentation improvements and updates
  3. * Fixed that the required string was appended to the label over and over due to localizer caching
  4. * Fixed that the checkbox's `name` attribute was included in the attributes of the matching label element on boolean fields
  5. 2.1.0
  6. * no changes
  7. 2.1.0.rc
  8. * documentation improvements
  9. * improved performance by caching of Formtastic's i18n lookups
  10. * improved performance in production by checking for defined constants instead of catching the exception
  11. * fixed arguments passed into fields_for being flattened one level too deep
  12. * added an optional `index` that an inputs() block can access for use in labels and other HTML attributes
  13. 2.1.0.beta
  14. * Added Rails 3.2 compatibility
  15. * Added a new Actions DSL (f.actions, f.action) — see below for deprecation of the Buttons DSL
  16. * Added new i18n_localizer configuration, allowing you to use your own localiser class instead of Formtastic::Localizer
  17. * Added a hidden input before mutli-selects, to allow full clearing of the select (like we do for checkboxes)
  18. * Added support for integers in a :collection for radio and check_boxes inputs
  19. * Added support for time inputs with no current value to default render blank inputs rather than pre-selecting the current time
  20. * Brought back the Form Generator from 1.2.x versions of Formtastic
  21. * Added support for placeholder text on textareas (text inputs)
  22. * Deprecated the Buttons DSL (f.buttons, f.commit_button) in favor of the new Actions DSL — see above
  23. * Removed the previously deprecated :label_method, :value_method & :group_label_method options
  24. * Removed the previously deprecated :as => :numeric
  25. * Removed the previously deprecated inline_errors_for and related methods
  26. * Removed the previously deprecated SemanticFormHelper and SemanticFormBuilder
  27. * Fixed the behavior of :include_blank and :prompt options to be inline with Rails’
  28. * Fixed that :input_html => { :multiple => true } did not force a single choice select into a multi choice
  29. * Fixed date, time and datetime legend labels to correspond to the first visible input, rather than the first input (which may be hidden)
  30. * Fixed that DateInput should treat fragments excluded from :order option as discarded
  31. * 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
  32. * Fixed numerous Mongoid and MongoMapper compatibility issues
  33. * Fixed that we should be calculating the length of integer columns as bytes
  34. * Fixed many inputs (date, datetime, time, checkboxes, select & boolean) that did not correctly use the :index option in fields_for
  35. * Fixed Haml and Slim template indentation
  36. * Fixed invalid html output for nested inputs with multiple siblings
  37. * Fixed i18n keys with nested objects
  38. * Many documentation fixes and improvements
  39. * A few performance improvements
  40. 2.0.2
  41. * Fixed that MongoMapper does not use `associations(method)`. `.associations` is an accessor.
  42. 2.0.1
  43. * fixed that `:multiple => true` wasn't working when no association present
  44. 2.0.0
  45. * Fixed that all check boxes were incorrectly checked if an Array was passed in to :collection
  46. * Improved README
  47. * Added form generator template for Slim template engine
  48. * Added support for Proc conditions in collection_from_association
  49. * Refactored commit button. Split it into a couple of different methods to make it easier to override.
  50. 2.0.0.rc5
  51. * 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
  52. * Fixed that the `novalidate` attribute was being applied to the `<form>` tag when it shouldn't have been (and vice-versa)
  53. * Fixed `undefined method `last' for #<Classname>` with a `:collection` containing an array of arrays
  54. 2.0.0.rc4
  55. * Fixed that TimeInput was not rendering hidden y/m/d inputs by default.
  56. * Fixed test suite under Rails 3.1.0.rc5
  57. * Fixed false and blank fragment labels on date/time inputs producing unsafe HTML.
  58. * Fixed that inputs were 'required' withput considering `:on => :create` validations
  59. * Fixed that collections of strings in CheckBoxesInput were ot being correctly checked be checked if they match the model
  60. * Fixed that the required attribute was added to the choices in a :radio or :check_boxes input, instead of just the parent input wrapper
  61. * Fixed semantic_fields_for when used with a hash-like model
  62. * Fixed that models without defined validations (even if validators_on exists) should not be considered required
  63. * Fixed min/max attributes when the validation uses a Proc
  64. * Fixed that inputs should not be considered required if :allow_blank => true is set on validates_inclusion_of
  65. * 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
  66. * Fixed a typo in the config template
  67. * 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
  68. * Changed HTML5 `step` attribute to default to "any" instead of "1"
  69. * Added CarrierWave support for to file input detection
  70. * Added a configuration 'perform_browser_validations' to opt out of HTML5 browser validations.
  71. * Added more support for mongo documents, including MongoMapper-specific reflection capability
  72. * Added IE specific stylesheets & moved those styles out of main stylesheet, include them yourself if needed
  73. * Added a new configuration to opt out of HTML5 required attribute
  74. 2.0.0.rc3
  75. * Fixed that .label class was incorrectly applied to <label> tags inside a .choice on radio and checkbox inputs (#599)
  76. 2.0.0.rc2
  77. * Fixed install instructions in readme to reflect 2.0.0.rc1
  78. * Fixed that the checkbox was mistakenly placed after the label text in BooleanInput, not before it as per 1.x (#591)
  79. * Fixed that select inputs had two "blank" options at the top in some cases (#590)
  80. * Added documentation for Timeish inputs (date, datetime, time) (#589)
  81. 2.0.0.rc1
  82. * Removed the "inline_order" configuration (redefine input_wrapping instead)
  83. * Removed the "special" implementation of label() from FormBuilder, so builder.label will call Rails' label helper, not ours
  84. * Changed the HTML id attribute used for hidden inputs to be consistent with all other inputs
  85. * Changed formtastic:form generator include the wrapping semantic_form_for block
  86. * Changed formtastic:form generator to generate a partial by default (instead of copying to clipboard, which can be done with --copy)
  87. * Removed formtastic_stylesheet_link_tag
  88. * Improved some documentation, much more to come
  89. * Tagged many modules as @private to remove from YARD documentation
  90. * Added YARD as development dependency for a massive documentation effort
  91. * Renamed Formtastic::SemanticFormHelper to Formtastic::Helpers::FormHelper (SemanticFormHelper still exists as a module which includes the new module, need to handle deprecation notices somehow)
  92. * Renamed Formtastic::SemanticFormBuilder to Formtastic::FormBuilder (SemanticFormBuilder still exists as a subclass, need to handle deprecation notices somehow)
  93. * Massive refactoring of formtastic.rb into around 30 files and modules like StringInput and ButtonsHelper
  94. * Removed chunks of Rails 2 specific code, tests and documentation
  95. * Added support for HTML5 required attribute on input, select and textarea tags
  96. * Added support for HTML5 min/max/step attributes on NumericInput
  97. * Added support for HTML5 placeholder attributes on Stringish inputs (string, email, phone, url, search, number, password)
  98. * Added support for HTML5 autofocus attributes
  99. * Changed nested inputs() blocks to be automatically wrapped in an `<li>` tag to preserve HTML validity
  100. * Changed quick forms to skip polymorphic associations (they didn't work)
  101. * 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)
  102. * Changed input() to raise an error when a :collection is not provided for a polymorphic association (we can't guess which class to use)
  103. * Removed semantic_remote_form_for etc, the remote_form_for helpers don't exist in Rails 3
  104. * Changed :label_method option to :member_label (with backwards compat and deprecation warnings)
  105. * Changed :value_method option to :member_value (with backwards compat and deprecation warnings)
  106. * Changed :grouped_label_method option to :grouped_label (with backwards compat and deprecation warnings)
  107. * Added support for a Method objects to :member_label/:member_value (aka :label_method/:value_method)
  108. * Improved support for Mongoid
  109. * Changed Rails dependency from ~> 3.0.0 to ~> 3.0 to allow experimentation with Rails 3.1 betas
  110. * Removed some overly eager CSS resets on form elements that made Opera and FF inputs look pretty ugly
  111. * Removed specificity and duplication in CSS
  112. * Added many new classes to DOM elements to enable more efficient and descriptive CSS
  113. * Improved visual/spacing consistency in checkboxes
  114. * Added non-standard zoom:1; to clearfixes to support IE better
  115. * Changed CSS coding style to multi-line so we can annotate the styles better
  116. * Fixed that overly specific CSS rules weren't applied to nested form elements properly
  117. * Removed formtastic:form generator and changed formtastic:install generator
  118. to override scaffold generator
  119. * Refactored and consolidated CSS by adding extra class names into the mark-up, preferring to style by class instead of element wherever possible
  120. * Added IE6 and IE7 stylesheets for specific fixes if needed (uncomplicates formtastic.css)
  121. * Added support for Rails 3.1 asset pipeline as well as previous generated CSS for Rails < 3.1
  122. * Made many subtle visual improvements to CSS, especially in IE
  123. 1.2.4
  124. * no changes
  125. 1.2.4.beta2
  126. * Changed :boolean inputs to use Rails' check_box_checked? instead of our own logic
  127. * Changed developer instructions in README
  128. * Fixed :boolean inputs to disable the included hidden input when disabling the actual checkbox
  129. * 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
  130. * Fixed that tiny scroll bars were appearing on legends in date/time/radio/cbheckboxes fielsets (GH-477)
  131. * Fixed an issue when formtastic fails to determine if a checkbox is checked with custom checked and unchecked values (thanks to Eugene Bolshakov)
  132. * Fixed that the hidden input rendered with a boolean checkbox did nt use the custom :name from :input_html options hash
  133. * Fixed issue where Firefox 4 gives focus to the <li> wrapper (fixes #524).
  134. * Fixed that a shared input options hash could not be re-used in the view without being altered by each input
  135. * Improved compatibility with Mongoid Documents
  136. * Updated i18n dependency to ~> 0.4
  137. 1.2.4.beta
  138. * Changed :boolean inputs to use Rails' check_box_checked? instead of our own logic
  139. * Changed developer instructions in README
  140. * Fixed :boolean inputs to disable the included hidden input when disabling the actual checkbox
  141. * 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
  142. * Fixed that tiny scroll bars were appearing on legends in date/time/radio/cbheckboxes fielsets (GH-477)
  143. * Fixed an issue when formtastic fails to determine if a checkbox is checked with custom checked and unchecked values (thanks to Eugene Bolshakov)
  144. * Fixed that the hidden input rendered with a boolean checkbox did nt use the custom :name from :input_html options hash
  145. 1.2.3
  146. * Removed deprecated methods input_field_set, button_field_set, boolean_select_input, boolean_radio_input and boolean_radio_input
  147. * Removed deprecated :class option on commit_button (use :input_html instead)
  148. * Fixed that stylesheets and initializers directories would be removed on uninstalling
  149. * Fixed some documentation and formatting
  150. * Fixed test coverage issues under Ruby 192 and Rails 2
  151. * Fixed that input_html options were not being passed down to checkbox tags
  152. * Changed internal duplication of the options hash so that the same options hash can be re-used over multiple inputs without being altered
  153. * Changed internal configuration to use class_attribute when available (Rails 3) to avoid deprecation warnings
  154. * Added Rails 3 compatible form generator templates in addition to existing Rails 2 support
  155. * Added reflection on allow_blank option when determining the 'required' status of an input
  156. 1.2.2
  157. * Removed deprecated aliased input names (:as => :boolean_select, :as => :boolean_radio_input
  158. * Removed deprecated aliased method names (input_field_set, button_field_set)
  159. * Removed deprecated :class => 'whatever' on commit_button
  160. * Fixed that classes in :button_html were being merged into :wrapper_html
  161. * Fixed that :include_blank was being ignored (always false) for multi selects
  162. * Fixed that we should reflect on allow_blank option to determine required status with validates_inclusion_of
  163. * Added the ability to pass :input_html options be passed to the checkbox on a boolean input
  164. * Developers: Added bundler support to for developer/contribution
  165. * Developers: Fixed spec coverage under Rails 2 and Ruby 1.9.2
  166. 1.2.1
  167. * test suite compatibilities with Rails 3.0.3
  168. 1.2.1.beta3
  169. * Fixed bad merge related to :boolean inputs in 1.2.1.beta
  170. 1.2.1.beta2
  171. * Fixed typos in gemspec post-install message
  172. 1.2.1.beta
  173. * Fixed that unchecking :boolean inputs would not send the correct params (and not persist the change the the DB)
  174. * Fixed that :boolean inputs checked state was not reflecting the database/model value
  175. * Fixed that init.rb and rails/init.rb were not included in the gem (affecting Rails 2)
  176. 1.2.0
  177. * Changed default_text_area_width to nil, overlooked in recent CSS/width changes
  178. * Improved documentation
  179. 1.2.0.beta2
  180. * Added :wrapper_html functionality to commit_button() to match what input() does
  181. * Deprecated the :class option on commit_button(), use :wrapper_html instead
  182. * Added hpricot as missing development dependency
  183. * Improved documentation
  184. 1.2.0.beta
  185. * New Stuff
  186. * Added support for Paperclip's questionable use of multiple error keys on a single attribute, so errors on Paperclip :file inputs Just Work
  187. * Added ability for the error and hint class to be overridden with :hint_class and :error_class, and configurable defaults app-wide
  188. * 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
  189. * Added a fallback to Rails' helpers.label key if Formtastic label translation are not found
  190. * Added support for default_text_area_width
  191. * Added support for #persisted? over #new_record? (ActiveModel)
  192. * Added the 'required' logic to attributes with validates_inclusion_of validation, in addition to validates_presence_of
  193. * Added new HTML5 :as => :email input (Rails 3)
  194. * Added new HTML5 :as => :phone input (Rails 3)
  195. * Added new HTML5 :as => :search input (Rails 3)
  196. * Added new HTML5 :as => :url input (Rails 3)
  197. * 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.
  198. * Added the ability to set your own form class, instead of 'formtastic'
  199. * Added maxlength attributes to inputs if it can be determined via the ValidationReflection plugin or ActiveModel validation reflections
  200. * Added the ability to override the form class (Post => "post") through an :as option on semantic_form_for option
  201. * 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
  202. * Added :first as a new rendering choice for the errors on each input
  203. * Added custom_inline_order to allow inline ordering per input type
  204. * Added the ability to override the generator templates in Rails 3
  205. * Fixes
  206. * Fixed invalid HTML generated by Rails' hidden inputs on checkboxes (by rendering our own hidden tag in a more deliberate place)
  207. * Fixed a bunch of invalid i18n key defaults
  208. * Fixed that 'required' classes and logic were not being applied to :check_boxes and :radio inputs
  209. * Fixed CSS bugs around Firefox's quirks with form elements that resulted in overflow/scroll bar issues
  210. * Fixed that errors on fields with association were not marking the wrapping tag with the error class
  211. * Fixed CSS where FF was displaying extra scroll bars on .check_boxes and .radio inputs (and the choices within them)
  212. * Changes
  213. * Changed that we were defaulting to a :select input for columns ending in _id, instead of columns with an appropriate associations
  214. * Deprecated a bunch of aliased method names that should no longer be used
  215. * Removed deprecated :selected, :checked and :default options
  216. * Changed the width styling for string, numeric, password and other basic inputs, defaults to 75% unless the size attribute is present
  217. * 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
  218. * 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)
  219. * Changed text input css behaviour updated to be similar to string etc
  220. * 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
  221. * Removed :label calls from the generated ERB in the form generator (i18n is preferred)
  222. * Changed that :select inputs for HABTM associations would ignore the :include_blank option
  223. * Changed the default method on collections from Model.find(:all) to Model.all
  224. * Removed the deprecated formtastic_stylesheets generator
  225. * Changed the minimum Rails version to 2.3.7, which the earliest version which the specs pass with
  226. * Changed :password inputs to be sized by percentage (like other string-ish inputs), rather then em-based
  227. 1.1.0
  228. * documentation changes only
  229. 1.1.0.beta [Specs passed against Rails 2.3.8, 3.0.0.rc & 3.0.0]
  230. * Changed semantic_remote_form_for to allow for unobstrusive javascript / :remote option (rails3)
  231. * Changed spec_helper to support Rails 2 with RSpec or Rails 3 with RSpec 2 environments
  232. * Changed Rakefile to initalize the correct testing framework for the enviroment
  233. * Changed i18n dependency to >= 0.4
  234. * Fixed use of model_name.human instead of model_name.human_name (rails3)
  235. * Fixed use of deprecated Errors#on_base
  236. * Fixed use of ActionController::RecordIdentifier#singular_class_name (rails3)
  237. * Added railtie to perform initialization tasks after the rails framework is available (rails3)
  238. * Added compatible install and form helpers (rails3)
  239. * Added support for ActiveModel Validations, thanks to Guillaume Belleguic (rails3)
  240. 1.0.1
  241. * fixed "already initialised constant" warnings on boot
  242. 1.0.0
  243. * nothing changed from rc2
  244. 1.0.0.rc2
  245. * Fixed that :label=>false didn't disable the label on checkboxes/radiobuttons (#331)
  246. * Added full support of :input_html options for hidden fields
  247. 1.0.0.rc
  248. * Fixed that :checked_value and :unchecked_value options were being passed down into the HTML tags as attributes
  249. 1.0.0.beta4
  250. * ensure i18n < 0.4 is listed as a dependency in the gemspec
  251. 1.0.0.beta3
  252. * Added :ignore_date option to time inputs (#308)
  253. * Fixed inputs_for_nested_attributes returning out of the proc on has_many associated nested models.
  254. * 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)
  255. 1.0.0.beta2
  256. * Added default escaping of html entities in labels and hints (#292, #299)
  257. * Added/Fixed that :value_method and :label_method were not being used for simple collections (like Arrays)
  258. * Added some more compatibility for Mongooid and other ORMs by checking for reflection information before calling it
  259. * Fixed deprecation warnings in Rails 2.3.6 and newer
  260. * Fixed a bug where :check_boxes and :radio were using method instead of :label option
  261. * Fixed a conflict where i18n lookups were failing when an attribute and model have the same name
  262. * Fixed some html that was not marked as safe
  263. 1.0.0.beta
  264. * 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)
  265. * Fixed that some inputs had invalid 'find_options' attribute (#262)
  266. * Fixed that we were calling html_safe! when it was not always available
  267. * Added the ability for :input_html to now accept an option of :size => nil, to exclude the :size attribute altogether (#267)
  268. 0.9.10
  269. * Fixed i18n incompatibility with Rails 2.3.8 by reverting two i18n patches pulled in from the rails3 branch
  270. 0.9.9
  271. * Changed date/time inputs to default to nil instead of Time.now when the object has no value (due to deprecation warning, #240)
  272. * Changed the behaviour of associations with a :class_name option to be more consistent with what Rails expects
  273. * Fixed issues relating to Rails 2.3.6 automatically escaping ERB
  274. * Fixed issues with Ruby 1.9.1 and Haml
  275. * Fixed use of deprecated {{key}} syntax in i18n interpolation (thanks to Hans Petter Wilhelmsen)
  276. * Added the :disabled option to check_boxes input
  277. * Added translation support for nested models (thanks to Toni Tuominen)
  278. 0.9.8
  279. * Deprecated :selected/:checked options, see http://wiki.github.com/justinfrench/formtastic/deprecation-of-selected-option
  280. * Changed CSS rules for fieldset lists to be more specific
  281. * Changed that radio and checkbox inputs used to associate the legend label with the first choice's input (#101)
  282. * Changed the generators to use |f| rather than |form| (#151)
  283. * Changed the behaviour of :selected/:checked options to address several bugs and inconsistencies (#152)
  284. * Changed CSS for input width property to max-width, allowing a size attribute to still be set
  285. * Fixed an issue where label_str_method not honoured if the object is an ActiveRecord object
  286. * Fixed incorrect html class for namespaced objects ("/" replaced with "_")
  287. * Fixed compatibility issue with SearchLogic (#155)
  288. * Fixed an issue where label_str_method was not being overridden with i18n
  289. * Fixed a button text issue with Rails 2.x in which human_name on multi-word models returned one word (eg Ticketrequest) (#153)
  290. * Fixed the behaviour of select inputs when the belongs_to or has_many association has a special :class_name option
  291. * Fixed line numbers from eval'd code, to help when debugging
  292. * Fixed CSS issue that hidden fields were not always hidden (Chrome for example) (#209)
  293. * Fixed and improved CSS with nested fieldsets and legends
  294. * Fixed date/time inputs where :include_seconds => true
  295. * Fixed that inline hints were still being rendered on hidden inputs
  296. * Fixed broken CSS declaration missing a colon
  297. * Added configuration preferences for row and column attributes on textareas
  298. * Added semantic_errors helper and CSS (for all errors on an object)
  299. * Added :filename to the list of @@file_methods, to support carrierwave plugin (#156)
  300. * Added a Formtastic::LayoutHelper with formtastic_stylesheets helper method for linking to all Formtastic CSS files
  301. * Added labels option to date/time/datetime fields to customise the label of each part of the set (year, month, etc)
  302. * Added many improvements to the README and docs