-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Could not find a valid mapping for #<AdminUser ... #733
Comments
I started getting the same issue when I first had a Device instance set-up for a User model, then tried to add active_admin per the above referenced method. I too am stumped. |
I am having the same issue is there no solution for this yet? |
I have found the problem to be in the following line in admin_user.rb after_create { |admin| admin.send_reset_password_instructions } If you comment it out, it works. Will try to further understand why, but in the meantime if you don't absolutely need this feature. It might help |
I found the problem. It is in the following function inside the devise:
The problem (as discussed here: http://www.ruby-forum.com/topic/1032905) is that the provided instance of AdminUser does not respond to is_a?(AdminUser) as the two are not the same due a code reloading quirks in Rails. As it keeps happening to me in 3.1.0 it seems that it has not been resolved yet. To avoid the problem enable the class caching in development.rb
Please post better solution when available |
Is there any solution for the problem except cache clases in development? 10x! |
Same here. Any news? Rails 3.1.3 ActiveAdmin 0.3.4 |
+1 for a fix |
Confirming that I also have the same issue here. Have not yet found a suitable solution other than as mentioned above. |
just add a password field to form like below: form do |f| In the create new user page, enter a password beside the email. Also remove after_create callback in model. |
And don't forget to restart the server if you change the development.rb file with: config.cache_classes = true |
Yes, I did. Not sure why it does not show in the form for you. It just a field like other fields and nothing more. On Dec 19, 2011, at 5:36 PM, Pourrier François wrote:
|
The important thing is: It is working. |
I'd like see an another solution too... even if there is a workaround (and not a solution!) to it. |
Out of curiosity do you have a "is_a?" method defined in your Admin Controller? You may be monkey patching the is_a? method on the Object class. http://ruby-doc.org/core-1.9.3/Object.html#method-i-is_a-3F If this is the case just change your is_a? method in your Admin class to is_an? or some other method and it should work. |
The class reloading issues that caused this have been fixed in 0.4.0. Please re-open this ticket if it continues to be an issue. |
@gregbell and what about locale reloading issue? |
Hi,
I follow the steps of https://github.com/gregbell/active_admin/wiki/Your-First-Admin-Resource%3A-AdminUser to create new users, but when i try to access other sections of active_admin i received the next message:
RuntimeError in Admin::AdminUsersController#create
Could not find a valid mapping for #<AdminUser id: 2 ....
I check the steps and my code is like the tutorial. Do you have any suggestions? thanks!
The text was updated successfully, but these errors were encountered: