Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Namespaced Controllers not building new resource from params (1.6.8) #664

Closed
jnimety opened this issue Jun 26, 2012 · 5 comments
Closed
Assignees

Comments

@jnimety
Copy link

jnimety commented Jun 26, 2012

works in 1.6.7. When upgrading to 1.6.8 load_and_authorize_resource is not building a resource from params.

class Settings::ControlUsersController < ApplicationController
  load_and_authorize_resource :class => 'User'
  def create
    # @control_user is a User but was not built with params[:control_user]
    respond_to do |format|
      if @control_user.save
        #...
      else
        #...
      end
    end
  end
end
@ghost ghost assigned andhapp Jun 29, 2012
@andhapp
Copy link
Collaborator

andhapp commented Jun 29, 2012

@jnimety: This is a regression in 1.6.8. I've created a fix for it. Can you please use my fork of CanCan and branch "fix-issue-664" and test it out. Here's the link to it: https://github.com/andhapp/cancan/tree/fix-issue-664. If it does fix your issue, I'll create a pull request and get it merged. Thanks.

@jnimety
Copy link
Author

jnimety commented Jun 29, 2012

this fixes the issue

@andhapp
Copy link
Collaborator

andhapp commented Jun 29, 2012

Thanks. WIll close this issue as I've created a pull request for the same.

@andhapp andhapp closed this as completed Jun 29, 2012
@jnimety
Copy link
Author

jnimety commented Aug 1, 2012

is there a new release coming soon that will include this fix?

@andhapp
Copy link
Collaborator

andhapp commented Aug 2, 2012

Yeah. Pretty soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants