Heyya guys.
So i thought about this coolio idea, if you are logged in then you get some sort of dashboard, else you get an information/login/sign up page.. So how do i do that..
I mostly wants to do this in Routes = not something like
def index
if current_user.present?
render :action => 'logged_in'
else
render :action => ...
On my development machine I can login fine, but once on production,
authentication fails for the base user created in the migration.
I can reset my password and upon doing so I am auto logged in, but
when I logout and try to login again using the newly entered password,
once again it tells my I have a bad email and/or password.
An...
from rake routes I get this in my application
new_admin_session GET /admins/sign_in(.:format) {:controller=>"devise/sessions", :action=>"new"}
admin_session POST /admins/sign_in(.:format) {:controller=>"devise/sessions", :action=>"create"}
de...
I've set the following up.
----------------------
config/environments/development.rb
----------------------
29 ActionMailer::Base.delivery_method = :smtp
30 ActionMailer::Base.perform_deliveries = true
31 ActionMailer::Base.raise_delivery_errors = true
32
33 ActionMailer::Base.smtp_settings = {
34 :enable_starttls_au...
gem 'rails', '3.0.0'
gem 'devise'
gem 'bson_ext', '>= 1.0.7'
gem 'bson', '>= 1.0.7'
gem 'mongo_mapper', :branch => 'rails3', :git => 'http://github.com/jnunemaker/mongomapper.git'
gem 'devise-mongo_mapper', :git => 'git://github.com/collectiveidea/devise-mongo_mapper'
With the above setup I get the following errors on requests:
Starte...
Hi there,
I'm using Devise in a Rails 3 app, and I successfully configured it so that it uses a username as its authentication method instead of an email. The problem is that in the default registrations controller for devise, it calls an "update_with_password" method on the params passed in, which effectively allows users to change the...
Hi there,
I'm trying to get some basic authentication/authorization with devise/cancan with Rails. Rather than using roles like Ryan B's screencast and other examples around I'm trying to do something basic:
1 - A user can log in
2 - A user can only edit/destroy their own articles (no roles, you're either logged in and can create new ...
i'm trying to verify in my controller whether user has sufficient rights to upload files or not. swfupload does a POST request with (according to documentation) cookie values passed directly in POST request. this makes before_filter :authenticate_user! unusable, user is not authorized correctly.
as far as I know from devise docs, there ...
I'm having a problem with some devise routes. The session named routes have the actions in the rong place. It should be 'new_admin_session' and 'destroy_admin_session', but instead it's 'admin_session_new' and 'admin_session_destroy'. Anyone know what's happening?
admin_session_new GET /admin/sign_in(.:format) {:a...
Hi,
I'm in the process of learning rails. I've found Devise to be great with getting authentication up and running quickly and seamlessly but I do have one question.
How do I change the modules after the first run of the Devise generator (e.g. rails g devise User)? This defaults with the following migration:
def self.up
create_tab...
It seems there's not a whole lot of documentation out there covering how to add custom fields to a Devise authentication solution in a Rails 3 app.
Along with the required e-mail and password for users to sign up, I'd like a few other custom fields put in and validated and since there are no controllers generated with Devise, how does ...
I'm trying to get Custom Routes working in my Rails application (Ruby 1.9.2 with Rails 3).
This is my config/routes.rb file
match '/dashboard' => 'home#dashboard', :as => 'user_root'
devise_for :user do
get "/login", :to => "devise/sessions#new" # Add a custom sign in route for user sign in
get "/logout", :to => "devise/sessions#...
I am fairly new to Ruby On Rails and right now I am doing a simple app. In this app a user can create many items and I use devise for authentication. Ofcourse I want to make sure that you are the owner in order to delete items (Teams, Players etc) and the way I do it now is:
def destroy
@team = Team.find(params[:id])
if current_...
Hello, Im building a Rails 3 app, and have an Observer...
in the observer I need to user the current_user var that DEVISE allows me to user across my views...
How can you use the current_user.name or current_user.id in the Observer?
Thank you
...
I can't seem to get past this error when setting up devise.
Routing Error
wrong constant name Devise/registrationsController
or
Routing Error
wrong constant name Devise/sessionsController
I'm using Ruby 1.8.7, Rails 3.0 and Devise 1.1.3
Everything else on my app works, I recently upgraded my app from 2.3.8 and was previously usi...
I've previously implemented Authlogic for authorization on my site. Now however I wish to switch over to using Devise instead, and I'm wondering if anyone has any experience with this. Perhaps anyone's seen a blog post on the subject?
Thank you.
...
Hello, Is it possible to use devise and google oauth together?
I have successfully setup facebook in devise, but the following
google config doesn't work. Do I have to use oauth2 directly?
config.oauth :google, 'anonymous', 'anonymous',
:site => 'https://www.google.com',
:request_token_path => "/accounts/OAuthGetReque...
We are using the devise gem for authentication in a Rails 3 application. We have multiple roles and from the devise stand-point, the roles will differ in terms of confirmation, activation and remember me functionality.
The devise documentation has examples of two scopes being defined. One is the User itself and the other one is the admi...
having trouble with testing devise sign up on Cucumber. After "Sign Up" click
it shows
uninitialized constant User::ArticlesController (ActionController::RoutingError)
I suppose that's because right after Sign up, devise redirects logged user to Articles page and but it's not under namespace User. Because I test user it put everything u...
Does anyone know how to handle the session object manually?
I know devise stores it in the database, but there must be a way to set the session manually.
...