devise

How to auto-include a related model in devise's current_user helper method?

How can I add :includes => :account to the current_user finder method in devise ? Thanks ...

Customizing the confirmation_url in Devise

How do you customize this default line generated by Devise in the mailer view ? <p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p> I 've written a method in my controller called user_confirm. And have also defined a route for it. Can I get the url to link to tha...

Creating iphone & android apps for existing rails app

I've just spent a lot of time looking into the best ways to create iphone and android apps for an existing rails app that I've built and I feel that I haven't actually gotten any closer to knowing how to best achieve this. What I want: I would like to have the rails app and the mobile code cleanly separated. I'm not looking to just re...

Authenticating a user after #create

This seems to keep coming up for me on various projects and I'm wondering if anyone out there has a great solution: We have a Rails app with Authlogic authentication. Initially, there's a nice, clean, RESTful ListingsController that requires a user to be logged in before they can post/create: before_filter :require_user, :only => [ :ne...

Utilizing A Devise Session Through Flex With Rails3-AMF

I have a Flex front end and a Rails 3 back-end that I would like to establish a session to. Before you can access the page embedded with the flex front-end, you are prompted with a html login page through Devise. I am able to login fine through the html page but cannot get access to the session with Flex using amf requests. I have the...

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

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 config.ru. I ...

Rails/Devise - Add ruby code in a locale file ?

Hi, I would like to know if there is a way to add ruby code in a locale file. For example: devise: failure: unconfirmed: 'You have to confirm your account before continuing. <%= link to "send confirmation instructions?", user_confirmation_path %>' Thanks for your help! ...

Is it possible to add devise, if user model already exists?

We already created a user model in the beggining of the project, but now (several migrations later) we would like to use the devise gem. Is it possible to add devise if the user model and table already exist? That is, is it possible to alter what is already done, or do we have to start all over again? ...

I have multiple accounts each its own users, and want the users email address to only be unique per account

Hi, I am using rails to build a web app which provides each business with its own account and subdomain, Similar to how basecamp (and other 37 signals apps) lighthouseapp.com, and so on. Now I know that there are lots of decent tutorials on how to do subdomains in rails, and even the subdomain-fu plugin. The thing is that I want to us...

Rails/Devise - Customize flash message (devise.en.yml) with a link_to

Hi, 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. Someone give me a solution in stackoverflow but I don't know where I hav...

Devise: How to create a private admin role?

I have a simple Rails 3 blog app that needs an admin user so I can restrict creating and editing blog entries to the admin. I've used devise before, but only for users that are public and can be created by anyone. I don't want the ability to create an admin to be publicly accessible. How should I configure devise to be able to have an ad...

Accessing facebook interests with rails devise plugin

Hey! So i just got devise and fb login to work on my rails project, but I would like to get more info about the user when they log in. I added user_about_me to the scope of the request and that got me a lot of info, but I would also like to get the users music/movies/etc. I tried adding user_interests but it doesnt seem to send anything...

Rails/Devise - What should I test with devise and rspec ?

Hi, Many programmers use devise as their authentication solution and I would like to get their advice: Devise is already tested, but I want to know if there is something to test by myself (integration/unit/funtionnal tests?) for a standard devise integration with my knowledge (I'm not familiar with shoulda and cucumber, but I know a ...

Changes to the code are not getting reflected in Rails 3.0

Hi, I have started a project using Rails 3.0. I am using devise for the authentication. Devise includes links to signin and forgot password in the sign up page. These links are loaded by means of a partial.I did not need these links, so I removed them and reloaded the page, but still these links remain. I tried clearing the cache and ...

Rails/Devise - How to show registration information (not just edit it)

I installed Devise today and everything works fine so far. The only thing devise seems not to offer is a 'registration#show' action, which displays the user information (instead of the registration edit page). I tried to override the registrations-controller, but get the error: 'Unknown action-AbstractController::ActionNotFound' for all ...

Testing redirect after login with Devise

I've followed the recommendation from the Devise github pages for this: http://github.com/plataformatec/devise/wiki/How-To:-Redirect-to-a-specific-page-on-successful-sign-in Now this works great, but how would you test that you have this behavior now? ...

Certificate errors when using Devise with Facebook Oauth

Hi all- I'm using devise with oauth and Rails 3 (ruby 1.9.2) to log user's into my site. I followed this excellent blog post. That being said, I am getting a weird OpenSSL error, that seems to be due to some kind of certificate verification error. Heres what it looks like: OpenSSL::SSL::SSLError in Devise/oauth callbacksController#f...

Nginx Passenger 3.0 "LoadError" in Production

I have been battling with this question for the past couple of days. I have never been fortunate enough to have to install a Rails application on production and have been pulling my hair out over these errors. My application is currently running http://typealoud.com and throwing an exception which basically amounts to a "LoadError" in a ...

Rails Devise login system. How to customize login flow?

I have been using the devise gem for rails and I have facebook login system working. My problem is that there is so much going on in the background that I find it difficult to customize this. For example how do I change the path to the page the user is redirects to after the first time facevbook login, not the usual facebook login. It a...

How to make passwords optional using Devise?

How can I make the password optional into the registration and login when authenticating a user (if no password then it will just use the e-mail) using Devise. Although if they register with a password (or update it later) it should then be require for login. How can I accomplish this using Devise? Note: I'm using Rails 3.0.1 and Devise...