» Home » devise » Page 1
How can I use devise's “warden” to authenticate a rack app in the same stack as the rails app that uses devise?
by KompuKare in Development Tools & Services

By the way, I'm using rails 3.


How can I use devise's "warden" to authenticate a rack app in the same
stack as the rails app that uses devise ?


My problem is that when I call this:


request.env['warden'] # nil :(

from the other application on the rack stack I get nil !


I integrated dav4rack (webdav) in my rails app via


How to redirect user after sign in with Devise, and how to add method to Devise registration controller
by Maxton in Programming Languages

Using Rails 3.2.8, Devise 2.1.2, & Simpleform 2.0.2


I'm trying to redirect user upon successful sign in & sign out using devise.


So do I need to modify the controller if so how (specifics)?
Or do I need to implement the redirect helper, if so where do I put the helper?


Thanks a ton.


Devise::TestHelpers docs unclear on Devise.mappings[:mapping] usage
by Switzerland in Programming Languages

In the docs for using the Devise TestHelpers it states to use lines such as...


@request.env["devise.mapping"] = Devise.mappings[:admin]

or


@request.env["devise.mapping"] = Devise.mappings[:user]

...to let Devise know which resource or mapping to use since the controller tests bypass routes.rb. I am not clear on what these m


Devise controller can't see persisted devise resource record in test environment
by allisolm in Programming Languages

I'm having a lot of trouble with a test I'm writing.


I'm using rspec, factory-girl, and capybara-webkit for testing.


I extended the RegistrationsController to provide a helper method for validating the uniqueness of email addresses:


class RegistrationsController < Devise::RegistrationsController
def email_in_use
if User.where('email = ?

Devise 404 errors on production server, No route matches {:controller=>“devise/home”}
by China in Programming Languages

I'm getting devise 404 errors on a production server, both for get requests to /users/sign_in and its "link_to" equivalent. If I copy development.rb to production.rb, I get the error:


No route matches {:controller=>"devise/home"}


This:


Works on my development box.


Doesn't work on the production box using either webbrick or passenger.



Defining own Devise controllers prevents Devise using custom views
by maniacalpha1-1 in Programming Languages

I used config.scoped_views = true in initializers/devise.rb to make Devise use my own views rather than its default views for my two roles (Admin and Subscriber). This worked great, and I went ahead and customized my views.


Then earlier today I added my own controllers that subclass Devise's controllers and told devise to use these controllers in rout


Rails/Devise - Customize flash message (devise.en.yml) with a link_to
by christiandsg in Web Design

I would like to customize the following flash msg provided by devise
in the devise.en.yml file:


devise:
failure:
unconfirmed: 'You have to confirm your account before continuing.'

with ruby code in order to get a link to new_user_confirmation_path.


in other words, I want my flash message displays something like :


<

Missing default devise routes after installing devise + activeadmin
by javascript in Programming Languages

I have recently started rails for a new project. I tried to install devise and activeadmin using this guide but the default devise routes seem to be missing. I can go to /users/sign_in to sign in but users/sign_up does not work. Rake routes does not show any routes for registration. What am I doing wrong?


devise overrule devise SessionController broke login
by HokieGeek in Programming Languages

I have extended the devise controller for sessions. To add some extra functionality when a user logs in. Now upon login, IF no username or password are entered I get error :
SessionsController#create


Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id


I searched last week for up to 2 hours how to fix this anyone can he


rails devise - how to have 2 devise authentications for two different user models?
by Micah in Web Design

We have admin_users and we have regular users and they both have separate tables, models and devise logins.


It might make more sense to use devise against just one user table and use cancan for the roles but the application has already been created with two separate user tables and it's not an option to change them at this point.


The admin users functionality, including


Next



Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .