NoMethodError Devise::SessionsController#new /undefined method `is_navigational_format?'

664 views
Skip to first unread message

Boris Tuman

unread,
May 30, 2013, 3:49:30 PM5/30/13
to plataforma...@googlegroups.com
Hey all, I am getting an error that I have not seen anyone mention before. 

NoMethodError in Devise::SessionsController#new

undefined method `is_navigational_format?' for #<Devise::SessionsController:
I have only seen it posted before when someone was trying to override the default controller, which I was not able to do. If you need more info/files/ect please let me know 

and...@benjamin.dk

unread,
Jun 3, 2013, 7:55:44 AM6/3/13
to plataforma...@googlegroups.com
Where in the code are you getting this error?

did you just simply install devise and generated the views? no customization at all?

if you solve this please answer!

Boris Tuman

unread,
Jun 3, 2013, 9:23:58 AM6/3/13
to plataforma...@googlegroups.com
The code is within devise. Take a look. https://github.com/plataformatec/devise/blob/270e2ece19f20fdbb349b8130c31acc5b222fabb/app/controllers/devise/sessions_controller.rb . I installed devise as a replacement to restful authentication following devises instructions. I did not generate the views yet. 

I have not yet solved this. 

André Orvalho

unread,
Jun 3, 2013, 9:59:50 AM6/3/13
to plataforma...@googlegroups.com
So if you did not generated the views how are you hitting the sessions controller and how do you want it to respond?

here you can find documentation for what is is_navigational_format?()


generate the views and try the same the error should disappear.


Boris Tuman

unread,
Jun 3, 2013, 10:06:11 AM6/3/13
to plataforma...@googlegroups.com
From what the devise documention said generating the views is optional. "Since Devise is an engine, all its views are packaged inside the gem. These views will help you get started, but after some time you may want to change them. If this is the case, you just need to invoke the following generator, and it will copy all views to your application:" http://devise.plataformatec.com.br/#getting-started/configuring-views.

Why would generating the views help or change anything? How is that related to the session controller? I have read the documentation for is_navigatial_format?, the issue is not how the Boolean is being used but rather that the Boolean is not initialized.  

André Orvalho

unread,
Jun 3, 2013, 10:30:08 AM6/3/13
to plataforma...@googlegroups.com
Well is_navigational_format gives you the type of request you sending to the controller, so how are you visiting the controller? which url and view are you hitting? is pretty weird you are getting that error, which versions of rails and devise are you using? can you set up a git repository I can clone and try out the error?


2013/6/3 Boris Tuman <boris...@gmail.com>

--
 
---
You received this message because you are subscribed to a topic in the Google Groups "Devise" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/plataformatec-devise/iVKAMVSjEMI/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to plataformatec-de...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Boris Tuman

unread,
Jun 3, 2013, 10:42:22 AM6/3/13
to plataforma...@googlegroups.com
https://github.com/plataformatec/devise/issues/2445 it was very strange, I think I have found the cause, I had config.action_controller.session ={stuff} in my application.rb, I am still making sure the error is gone


2013/6/3 Boris Tuman <boris...@gmail.com>
To unsubscribe from this group and all its topics, send an email to plataformatec-devise+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages