Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Providing procs to collection helpers #75

Merged
merged 7 commits into from
Dec 10, 2019

Commits on Dec 7, 2019

  1. Add Traits namespace with CollectionItem

    CollectionItem will hold functionality that's specific to items
    belonging to a collection. Initially, this covers the retrieval of the
    value depending on what's passed into the :text_method, :value_method or
    :hint_method params.
    
    These arguments now accept and properly deal with procs
    
    Refs #68
    peteryates committed Dec 7, 2019
    Configuration menu
    Copy the full SHA
    d878e39 View commit details
    Browse the repository at this point in the history
  2. Integrate Traits::CollectionItem with elements

    Instead of using `#send` inline to retrieve the value from `@item`, make
    use of `#retrieve` which works with procs.
    
    Refs #68
    peteryates committed Dec 7, 2019
    Configuration menu
    Copy the full SHA
    bcc5eec View commit details
    Browse the repository at this point in the history
  3. Add specs covering localisation via procs

    The :value_method, :text_method and :hint_method params passed to radio
    collections and the :hint_method params passed to checkbox collections
    now accept procs which can be used to customise the value retrieved from
    the item.
    
    This could be used for simple transformations like upcasing the text or
    more-complex operations like localising the value, as per the provided
    specs
    
    Refs #68
    peteryates committed Dec 7, 2019
    Configuration menu
    Copy the full SHA
    0dfc865 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2019

  1. Configuration menu
    Copy the full SHA
    4286c34 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    40efb99 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3808eda View commit details
    Browse the repository at this point in the history
  4. Disable travis bundler cache

    Some builds are failing before the lint/tests are run (when installing
    and compiling gems). Try temporarily disabling the cache
    peteryates committed Dec 8, 2019
    Configuration menu
    Copy the full SHA
    657c81f View commit details
    Browse the repository at this point in the history