» 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?
Category : 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


View Replies


Devise::TestHelpers docs unclear on Devise.mappings[:mapping] usage
Category : 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


View Replies


How to redirect user after sign in with Devise, and how to add method to Devise registration controller
Category : 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.


View Replies


Devise controller can't see persisted devise resource record in test environment
Category : 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 = ?

View Replies


Devise 404 errors on production server, No route matches {:controller=>“devise/home”}
Category : 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.



View Replies


Defining own Devise controllers prevents Devise using custom views
Category : 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


View Replies


Rails/Devise - Customize flash message (devise.en.yml) with a link_to
Category : 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 :


<

View Replies


Missing default devise routes after installing devise + activeadmin
Category : 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?


View Replies


devise overrule devise SessionController broke login
Category : 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


View Replies


Rails & Devise: Make Variable Available in Devise View
Category : Development Tools & Services

I can't seem to find this anywhere... I'm trying to add a dashboard to one of my devise screens (registrations/edit), but I need to make some variables available. How do I do this without rewriting all of the devise controller logic?


View Replies


Next
2012 / 2017 Copyrights BigHow , All Rights Reserved .