-
Notifications
You must be signed in to change notification settings - Fork 159
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
Rails 5 support, fix #60
Comments
where can i find the form_helper.rb?? |
@eperezgarcia1201: it is inside gem: lib/carmen/rails/action_view/form_helper.rb:224 |
FYI it looks like If you take a look at the definition of rails
I'd suggest using something like that for completeness. Here's how I fixed it: |
i do not know how to fix this "undefined method `to_region_select_tag' " |
The project maintainer has said that they are not maintaining the project. I've patched it to support rails 5 at https://github.com/Studiosity/carmen-rails I'd be happy to put a PR together with updated travis configs if you're interested @jim |
I got this "Git error: command `git clone '[email protected]:Studiosity/carmen-rails.git'" when I was doing "bundle install" |
how have you configured your Gemfile? Should have something like:
|
@abrom ... it looks like Rails 5.2 breaks even more. Getting the good 'ol This gem is so outdated that I feel like your branch should become the master, but obviously, up to you. I tried diagnosing a little bit, but wasn't making any progress yet. Can't decide whether to spend more time on it or look for a new option, maybe JS based. I couldn't tag you in a new issue, plus, this one's still open. |
After spending an hour or two debugging, I finally figured out where the error was coming from when using 5.2. Line 213 needs to be updated from: to: Here's the file if anyone needs it, updated with @abrom's fixes too. https://github.com/kevinjbayer/carmen-rails/blob/master/lib/carmen/rails/action_view/form_helper.rb |
FYI i've created a branch that addresses this to retain Rails 4 & Rails < 5.2 support. Just checks the
|
@abrom this code is correct
|
@yuri-zubov unless I'm missing something here, you've just added parentheses to the call to Can you expand on your comment? |
@abrom sure,
in view
but we don't have filled the field with value 'US' on the form, because |
If anyone else has issues getting this to work in Rails 5, I was able to get it by forking and adding this to form_helper.rb after line 223:
On the line with
options[:include_blank] ||= true unless options[:prompt] || select_not_required?(html_options)
, I had to remove select_not_required? as this seems to be deprecated. Seems to work without, but not sure if it should be replaced with something else.The text was updated successfully, but these errors were encountered: