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

Enable use for plain ruby objects #88

Closed
jsugarman opened this issue Jan 6, 2020 · 2 comments
Closed

Enable use for plain ruby objects #88

jsugarman opened this issue Jan 6, 2020 · 2 comments

Comments

@jsugarman
Copy link
Collaborator

Hi @peteryates, this is great stuff and was looking to implement in a product I am working on over in MoJ.

One problem is you cannot use it against a plain ruby class due to the lack of errors on the object. I am just looking to create a basic search form with options.

I could monkey patch this or create a dummy errors method to patch this app-side but think it could be beneficial generally. I have a branch that I have it working in (with tests) but cannot push it - receive a 403.

@peteryates
Copy link
Member

Thanks Joel. I agree that adding the functionality to the gem is probably a good idea - I can't see any reason not to! If you fork this repo and create a PR I'll gladly review your changes and collaborate on adding the feature.

@peteryates
Copy link
Member

I had a quick attempt @jsugarman, will this (#90) work for you?

peteryates added a commit that referenced this issue Jan 9, 2020
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants