Open guivinicius opened 14 years ago
I get the same error.
the same error too
This error is related to the way that Devise does the queries to find users. For the autetication Devise passes a hash with a "conditions" option, but when the find method was called passing just an id, it didn't find the options[:conditions].keys. Now the bug was fixed, then the find method also can be called like this:
User.find "some_user_id"
Nice =D thanxx
I was having the same issue up until I pulled down the latest changes, now I'm getting the following error:
undefined method `errors' for nil:NilClass Extracted source (around line #4):
1: Edit <%= resource_name.to_s.humanize %> 2: 3: <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %> 4: <%= devise_error_messages! %> 5: 6:
<%= f.label :email %>
7: <%= f.text_field :email %></p
This form that you are using was generated by Devise?
yeah
Try to comment this line:
<%= devise_error_messages! %>
I m thinking that s a couchrest model problem, please, give me some days to analyse it.
I did that and it fixed that issue up until I try to update a user from there come up with another devise based error...
NoMethodError in Devise/registrationsController#update
undefined method `update_with_password' for nil:NilClass
I tried to edit by default devise update users form http://localhost:3000/users/edit
and updated successfully. What's the version of devise and couchrest model?
I'm using devise (1.2.rc 721843c) and couchrest_model (1.0.0.beta8 cc2b183), though I had the same issue when I was using devise 1.1.3
Please try:
Couchrest model 1.0.0.beta7 Devise 1.1.3
There seems to be a typo in 1.0.0.beta7's uniqueness validations
/home/baphled/.rvm/gems/ruby-1.9.2-rc2/gems/couchrest_model-1.0.0.beta7/lib/couchrest/model/validations/uniqueness.rb:1: unknown encoding name: urf-8 (ArgumentError)
I remember encountering that before and was why I tried out 1.0.0.beta8
I'll run devise testes with this ORM, please, wait a while.
no problem
baphled, I had exactly the same problems as you describe, however I am not using couchrest. I had overloaded the RegistrationsController for devise and removed the prepend_before_filter :authenticate_scope!, :only => [:edit, :update, :destroy] line at the top of the class adding this line again fixed the problem, does couchrest overload the RegistrationsController?
as far as I know, CouchRest not overload controllers. Did you try with the updated versions of devise and couch rest model?
Session Dump
View
UPDATE 09/29
Actually I'm getting this erros, everytime I send a find request for my model. It's like, the session is passing empty values for the method.