Closed andrewvmail closed 10 years ago
There is no big differences between rails 3 and rails 4. Have you tried it with rails 4 and something doesn't work?
I'm such a noob I forgot to define some routes. I can confirm that this Gem works for Rails 4.
I was having trouble... I think rails 4 defaults to checking the params in the controller rather than in the model, so the controller should be changed in addition to the other things, and the model shouldn't have attr_accesible, or attr_accessor set for the attributes.
# users controller
def user_params
params.require(:user).permit(:first_name, :last_name, :email, :password, :password_confirmation, :authorization).tap do |whitelisted|
whitelisted[:problems_attributes] = params[:user][:problems_attributes] unless params[:user][:problems_attributes].nil?
end
end
The gem otherwise works identically.
Does this gem works with rails 4 if so what is required? From the wiki I can only see instructions for rails 3 and can't find any info from the issues.
Thanks !