Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on May 2, 2015
Commits on Apr 16, 2015
  1. Support :select_options option for date/datetime :as=>:select, for se…

    …tting specific options in each select field
  2. DRY up code and docs for date and datetime select inputs

    While here, don't modify the input's :label_for option when
    formatting a date/datetime input.  Instead, just make sure the
    id given is used for the first field, so that will automatically
    be tied to the input's label.
  3. Support :order option for date/datetime :as=>:select inputs, so you c…

    …an order select boxes day-month-year or month-day-year
Commits on Apr 14, 2015
Commits on Mar 30, 2015
  1. Support :skip_primary_key option to not add hidden primary key fields…

    … for existing associated objects in subform in the Sequel plugin
    Among other things, this code raises an exception if the associated
    object has a composite primary key, so the :skip_primary_key option
    offers a way to workaround that.
Commits on Mar 12, 2015
  1. Support :blank_position=>:after option for select/radioset/checkboxse…

    …t inputs
    This is rarely needed, but it should make things easier in those
    rare cases.
Commits on Feb 27, 2015
  1. Respect existing :add_blank option when using select tags for boolean…

    … fields in the Sequel plugin
    This allows you to not have a blank option, or to change the text
    used for a blank option.
Commits on Feb 3, 2015
  1. Use type=datetime-local for datetime types

    datetime-local seems to have wider browser support, and some
    browsers have purposely dropped support for datetime.
Commits on Jan 27, 2015
Commits on Nov 6, 2014
  1. Support pg_array_to_many associations in the Sequel plugin, treating …

    …them similarly to other *_to_many associations
    These weren't supported before because Forme doesn't handle
    unrecognized association types.  The only code change is that
    the field used should be the :key option for the association,
    since that specifies the column containing the array of
    associated values.
  2. When using :grid option to subform in the Sequel plugin, :inputs_opts…

    … can be used to pass options to the InputsWrapper
    Previously, there was no way to pass explicit options to the
    InputsWrapper when using :grid, so you couldn't set specific
    classes on the table created.
  3. Make explicit labeler use label-before and label-after classes specif…

    …ying the label position
    Forme doesn't automatically add colons when using the explicit
    labeler, it assumes they will be added via a CSS :after content
    setting.  However, in general you'll only want to add colons if
    the label comes before the input, not after.  So this makes it
    easy to use the appropriate CSS selector to only add the colons
    where they should be added.
Commits on Sep 11, 2014
  1. Support :size option for select inputs

    This also makes sure the multiple attribute it used if the :multiple
    option is given, even if there are no options, which can be useful
    if the options are added dynamically.
Commits on Sep 8, 2014
  1. Make form without a block in the ERB integration still use hidden tag…

    …s if method is post
    Previously, the hidden tags with the CSRF support would not be
    used if there wasn't a block given, but that's definitely not
    the desired behavior.
Commits on Sep 6, 2014
  1. Add Forme::RawString class and Forme.raw for creating raw strings, so…

    … you don't need to use extend(Forme::Raw)
    Code that requires Object#extend at runtime is really bad form,
    so add a string subclass that includes Forme::Raw to disable
    html escaping.
  2. Allow using nil as explicit transformer value when creating a Form, t…

    …o disable default transformer
    I believe this used to work, but there wasn't a spec for it.  I'm
    guessing the changes made between 0.9 and 0.10 broke it.
Commits on Jul 30, 2014
  1. Add roda plugin

    This just makes it slightly easier for roda users, but it is good
    to get the same specs on roda and sinatra.
Commits on Jul 24, 2014
  1. Allow running specs without rails or sinatra installed

    Just warn if they aren't install, continue running other specs.
Commits on Jun 24, 2014
  1. Prefer name and id to key for radioset/checkboxset inputs

    This is for consistency with all of the other inputs.
  2. Handle errors for empty radioset and checkboxset inputs

    Previously, this raised an exception as it assumed there was at
    least one input.  This handles the case where there are no inputs,
    by just putting in the error message span.
Commits on Jun 18, 2014
  1. Add Form#each_obj

    This iterates over an Enumerable of objects, using with_obj for
    each object and yielding each object with the index to the block.
    Make subform use this internally to simplify things.
    This also changes with_obj to yield the obj instead of not yielding
  2. Store namespaces in Form opts

    Instead of storing namespaces as a separate attribute, store them
    in the opts, so that you can use with_opts to change the temporarily.
    Additionally, add a with_obj method that takes a new object and
    additional namespaces, and replaces the object and updates the
    namespace temporarily.  This appends the given namespaces to the
    current namespace.
    Remove the Form#push_namespace and #pop_namespace private methods.
  3. Store Form obj in opts hash

    This changes obj from being an instance variable to being a member
    of the opts hash.  This means you can change it temporarily using
    with_opts(:obj=>new_obj){}, which in terms simplifies the subform
    implementation in the Sequel plugin by not requiring an explicit
    stack of nested associations.
Commits on May 18, 2014
Something went wrong with that request. Please try again.