devise

ERROR Errno::ECONNRESET: Connection reset by peer

走远了吗. 提交于 2019-12-23 06:50:14
问题 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: Started GET "/users/sign_out" for 127.0.0.1 at 2010-09-27 13:16:30 +0300 Processing by Devise::SessionsController#destroy as HTML Redirected to http://localhost:3000/

heroku rails app database migration issues

半腔热情 提交于 2019-12-23 06:15:12
问题 I recently added devise confirmable module to my rails app. My application runs well in dev. But, when I push it to heroku, it says "We're sorry, but something went wrong.". Following is my heroku log- Rendered devise/confirmations/new.html.erb within layouts/application (2.7ms) 2012-02-03T01:55:07+00:00 app[web.1]: Rendered devise/shared/_links.erb (0.5ms) 2012-02-03T01:55:07+00:00 app[web.1]: cache: [GET /users/confirmation/new] miss 2012-02-03T01:55:07+00:00 app[web.1]: Completed 200 OK in

heroku rails app database migration issues

点点圈 提交于 2019-12-23 06:15:05
问题 I recently added devise confirmable module to my rails app. My application runs well in dev. But, when I push it to heroku, it says "We're sorry, but something went wrong.". Following is my heroku log- Rendered devise/confirmations/new.html.erb within layouts/application (2.7ms) 2012-02-03T01:55:07+00:00 app[web.1]: Rendered devise/shared/_links.erb (0.5ms) 2012-02-03T01:55:07+00:00 app[web.1]: cache: [GET /users/confirmation/new] miss 2012-02-03T01:55:07+00:00 app[web.1]: Completed 200 OK in

Beta (Whitelisted) Email List for Registration on Devise

空扰寡人 提交于 2019-12-23 05:19:32
问题 I'm Using Devise and i'm trying to build a requirement that only emails that are included in my white list can actually Sign Up. Over Time emails will be added to that list. Meaning that Today there are 10 emails, tomorrow another 20+. But i don't know quite yet how to achieve this. I know that i have to Create my own Registrations Controller , and for the Validation i think i need something similar to this: before_validation :whitelisted? def whitelisted? unless WhiteList.exists?(:email =>

Adding facebook birthday information to some model in rails / devise / omniauth

女生的网名这么多〃 提交于 2019-12-23 05:17:29
问题 I had problems getting the birthday information from facebook into my app. Biggest problem was misunderstanding the permissions page from FB: http://developers.facebook.com/docs/authentication/permissions/ Here the birthday is described as user_birthday. But thats not how you can grab it from the response. I found a solution which is very easy. 回答1: Getting the birthday from facebok is easy if you have a method like def self.find_for_facebook_oauth(auth, signed_in_resource=nil) user = User

Devise/cancan redirect admin issue

旧巷老猫 提交于 2019-12-23 04:55:20
问题 I have a User model with a boolean switch to designate admin t/f. My current application controller: class ApplicationController < ActionController::Base protect_from_forgery def after_sign_in_path_for(user) if current_user.admin? admin_index_path else dashboard_index_path end end end My current admin controller: class AdminController < ApplicationController def index if current_user.admin? admin_index_path else home_index_path end end end The goal is of course to only allow access to the

Stored Android Accounts for Authentication of Rails + Devise Accounts

醉酒当歌 提交于 2019-12-23 04:26:15
问题 Summary: I'm trying to use stored Google accounts on an Android application to authenticate users in a native application, with an API provided by a Rails 3 + Devise application, and I'm stuck. Details: We have an application (http://push-poll.com) which lets users gather feedback from a bunch of their friends. We've also built a native Android application. Our web app allows you to log in with your Google account, and we want to extend that functionality to the native Android app. The web

Ldap is not working with Devise

拜拜、爱过 提交于 2019-12-23 04:22:39
问题 I am trying to use Devise with Ldap however I seem to be doing something wrong in the initial setup for devise with ldap I am already using devise with db auth but, I would like to switch over and use my existing AD. Any help would be greatly appreciated! I have this test script that only uses LDAP and it works perfectly require 'net/ldap' class ActiveDirectoryUser SERVER = 'myactivedir.mydomain.com' PORT = 389 BASE = 'DC=mydomain,DC=com' DOMAIN = 'mydomain.com' def self.authenticate(login,

Creating employee with devise user

狂风中的少年 提交于 2019-12-23 03:44:26
问题 It looks like this Profile model for Devise users? but mine is different. I want to create employee record and this employee have an option to have a user account or not. I am using devise gem for my user. So I have Employee model with has_one :user accepts_nested_attributes_for :user and User model belongs_to :employee I know that I need to put nested user in my view, But how to save it in controller? It is not something like this, right? params.require(:employee).permit(:name, user

Rails 3 Devise confirmation filter

↘锁芯ラ 提交于 2019-12-23 03:31:55
问题 I'm wondering if it's possible to selectively require confirmation for certain controller actions using Devise. Basically: I want users to sign up for an account (which will trigger a confirmation email), be automatically logged in, and be able to immediately explore certain parts of the site as a signed in (but still unconfirmed) user. Access to certain areas (e.g., payment) would require the user to first confirm their email . I'm hoping for something like before_filter: user_is_confirmed,