Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Commits on Jun 30, 2014
  1. Further suggested documentation edits

    Dave Howell authored committed
Commits on Jun 29, 2014
  1. Bump copyright year

  2. Minor README changes (Fixes #7)

    This adds documentation for the input and inputs methods, adds
    information on on the license, and moves the similar projects
    section to the bottom.
  3. Suggested modifications to Readme.rdoc

    Dave Howell authored committed
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. Use current namespace for form object inputs if :id/:name/:key is not…

    … specified
    Previously, objects that didn't respond to forme_input didn't
    use the current form namespace.
  4. 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
Commits on May 16, 2014
Commits on May 15, 2014
  1. Add :table, :tr, :ol, and :fieldset_ol wrappers, which automatically …

    …set wrapper and inputs_wrapper appropriately
  2. Add subform :grid option in Sequel plugin, for more compact editing o…

    …f nested *_to_many associations
    This allows you to edit multiple nested objects in a single table,
    with one row per nested object and one column per field, with the
    labels for each input as table headers.
  3. Make table inputs_wrapper accept a :labels option and automatically s…

    …et up th tags with the labels for each column
  4. Support Form#inputs :nested_inputs_wraper option

    This makes it possible to separate the inputs_wrapper used for the
    the current inputs call, and the one used for inputs calls inside
    the block.
Commits on May 14, 2014
  1. Add Form.with_opts method to override opts for the given block

    This takes quite a bit of refactoring because in the default case
    (without templates), formatting is not done at the time of
    Input creation.  So Inputs need to copy a reference to the Form
    opts when they are created, and use that later when formatting.
    Since the transformers for a form are no longer static, don't
    set instance variables for them, just look them up in the opts.
    The accessor methods for the transformers can go away as well.
    The one exception is the serializer, which needs to remain
    Additionally, the Form#format and #serialize methods can be
    removed as well, since nothing internally calls them, all
    access goes through the transformer.
  2. Remove Form#use_serializer and Serializer module

    These were originally needed by the Sequel module when forme_input
    could return an array.  However, that is no longer allowed,
    forme_input must now always return an Input or Tag.
  3. Refactor namespace/:key option handling

    Make push/pop namespace create a new namespaces array instead of
    mutating the namespaces array.
    When creating Inputs, instead of manually setting :name, :value,
    and :id options based on :key, just copy reference to the form's
    current namespace.
    Have the formatter look at the :key option and set the appropriate
    attributes if they are not already set.  This is more similar to
    how other attributes are set.
Commits on May 13, 2014
Something went wrong with that request. Please try again.