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

Rails4 support patch #141

Closed
wants to merge 2 commits into from
Closed

Rails4 support patch #141

wants to merge 2 commits into from

Conversation

xiaods
Copy link

@xiaods xiaods commented Dec 12, 2013

through rspec guide, fix globalize gem usage issue.

Deshi Xiao added 2 commits December 12, 2013 08:12
globalize gem add a validation for locale field in translation table
we should be explicit expose locale

more details see refinery#140
 It's because the Mail gem depends on mime-types at ~> 1.16 and other gems have
 moved on to 2.0. Relates to mikel/mail#641
@parndt
Copy link
Member

parndt commented Dec 12, 2013

I'd prefer to get rid of our dependence on protected_attributes if possible and upgrade the library to strong_parameters instead.

@xiaods
Copy link
Author

xiaods commented Dec 12, 2013

@parndt you mean do a patch on globalize gem ,let it support strong_parameters?

@parndt
Copy link
Member

parndt commented Dec 12, 2013

No, globalize doesn't have to do anything, all the Refinery projects are at fault.

@xiaods
Copy link
Author

xiaods commented Dec 12, 2013

@parndt Oops, if you gave me a hint, maybe i can do a patch on this topic.

@parndt
Copy link
Member

parndt commented Dec 12, 2013

Basically Rails 4 shipped with strong_parameters which replaces attr_accessible and thus the protected_attributes gem completely.

This requires you now filter parameters in the controller instead of the model. I believe there's a railscast on it.

@xiaods
Copy link
Author

xiaods commented Dec 12, 2013

@parndt got it. feel this is big change on refinerycms codebase. give me some times ba.

@xiaods
Copy link
Author

xiaods commented Dec 13, 2013

@parndt i found a potential question: In refinery/news/admin/items_controller.rb
crudify :'refinery/news/item', :order => "publish_date DESC"

I am reading the crudify's readme, it only support rails 3. How to use it with strong parameters.

@parndt
Copy link
Member

parndt commented Dec 13, 2013

We don't use an external version of crudify: that was extracted from refinerycms itself. Check https://github.com/refinery/refinerycms/blob/master/core/lib/refinery/crud.rb

@ugisozols
Copy link
Member

@xiaods are you still keen to add Rails 4 support? @parndt recently updated refinery/refinerycms repo to use strong parameters feature so you can check out what he did in refinery/refinerycms#2518.

Let me know if you cannot continue this and I'll happily take over.

@xiaods
Copy link
Author

xiaods commented Jan 22, 2014

@ugisozols I have no time on this patch currently, please ignore my progress.

@ugisozols
Copy link
Member

Alright. Closing this as I'm going to send a new PR. Thanks for putting time into this! :)

@ugisozols ugisozols closed this Jan 22, 2014
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

Successfully merging this pull request may close these issues.

5 participants