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

Allow plain ruby objects #90

Merged
merged 4 commits into from Jan 7, 2020
Merged

Allow plain ruby objects #90

merged 4 commits into from Jan 7, 2020

Commits on Jan 7, 2020

  1. Configuration menu
    Copy the full SHA
    3370995 View commit details
    Browse the repository at this point in the history
  2. Only check errors contents if object supports them

    This allows non-ActiveModel/ActiveRecord objects to be used by the form
    builder, it's sometimes useful when working with transient data; an
    example would be searches.
    
    Fixes #88
    peteryates committed Jan 7, 2020
    Configuration menu
    Copy the full SHA
    f238f63 View commit details
    Browse the repository at this point in the history
  3. Add a non-ActiveModel "Guest" struct for testing

    To test the formbuilder components use against
    a plain ruby class.
    jsugarman authored and peteryates committed Jan 7, 2020
    Configuration menu
    Copy the full SHA
    03baa14 View commit details
    Browse the repository at this point in the history
  4. Ensure errors when summary used on ruby objects

    This will highlight that there's a problem if a developer attempts to
    use the #govuk_error_summary in a form where the object doesn't respond
    to #errors. Also reformat and tidy up the examples file.
    
    The Naming/MethodParameterName cop is now disabled because it thinks two
    letter method params are bad (we're using :cv) 🤦
    peteryates committed Jan 7, 2020
    Configuration menu
    Copy the full SHA
    7221b98 View commit details
    Browse the repository at this point in the history