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

Possible incompatibility with 5.0.0.beta1 #272

Open
koeckc opened this issue Jan 24, 2016 · 6 comments
Open

Possible incompatibility with 5.0.0.beta1 #272

koeckc opened this issue Jan 24, 2016 · 6 comments

Comments

@koeckc
Copy link

koeckc commented Jan 24, 2016

Rails Version: Rails 5.0.0.beta1
Ruby Version: 2.3.0
Plugin Version: latest rails 3 Branch of the Plugin form Github
Browserversion: Latest Chrome on OSX
DB: Mysql 5.5

I would like to use your plugin in my Rails 5 Application .. is it possible ?
I always get an exception when im trying to use ist.

Exception:

Completed 500 Internal Server Error in 24ms (ActiveRecord: 0.6ms)

ActionView::Template::Error (undefined method `merge!' for {"controller"=>"sites", "action"=>"index"}:ActionController::Parameters
Did you mean?  merge):
    <%= grid(@sites_grid) do |g|
       g.column do |task|
         task.id
       end
  app/views/sites/index.html.erb:27:in `_app_views_sites_index_html_erb__2067296923291537766_70147368119400'

Controller code:

def index
    @sites = Site.all
    @sites_grid = initialize_grid(Site)
end

View code:

<%= grid(@sites_grid) do |g|
  g.column do |site|
    site.id
  end
end -%>

I am suspecting the problem comes from the fact that rails5 params is not a hash anymore but an object.
link http://eileencodes.com/posts/actioncontroller-parameters-now-returns-an-object-instead-of-a-hash/

Do you think your plugin is usable under rails5 already ?

Thx in advance
constantin

@leikind
Copy link
Owner

leikind commented Jan 24, 2016

I am suspecting the problem comes from the fact that rails5 params is not a hash anymore but an object.

Yes

Unfortunately I haven't been working on WiceGrid lately, and I don'y have any time to work on it now.

@koeckc
Copy link
Author

koeckc commented Jan 24, 2016

Thx for the fast response

@koeckc koeckc closed this as completed Jan 24, 2016
@leikind leikind reopened this Jan 24, 2016
@cfiorini
Copy link
Contributor

@leikind according to post on eileencodes.com I did a branch on my fork of wice_grid https://github.com/cfiorini/wice_grid/tree/rails5.
What I did is not tested well but, IMHO, can be a start to have wice_grid running on Rails 5, best could be a branch rails5 so you can start to accept PR.
BTW would be great to hear your opinions about ;)

@leikind
Copy link
Owner

leikind commented May 28, 2016

I could definitely merge a commit which runs to_h on params :)

@cfiorini
Copy link
Contributor

:)
I will do other test and work about wice_grid on Rails 5 and when I feel confident about it I'll do a PR

@leikind
Copy link
Owner

leikind commented May 28, 2016

ok 👍

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

3 participants