Displaying 15 results from an estimated 15 matches for "devise_for".
2010 Aug 16
2
Devise Nested Resources
...amount)
My question is how can I go about setting up routing for these nested
resources? When reading the documentation for Rails 3 routing I saw
the that the following was possible:
resources :users do
resource :address
resources :interests, :donations
end
Although when using devise, the `devise_for :users` helper doesn''t
appear to accept a block of nested resources. Does anyone have any
ideas on what I can do to setup this behavior (or propose alternative
ideas on what I could do). Any help would be greatly appreciated,
thanks!
--
You received this message because you are subscri...
2011 Jul 14
10
Devise confusing routes
..., I get
this...
new_user_session GET /users/sign_in(.:format)
user_session POST /users/sign_in(.:format)
destroy_user_session DELETE /users/sign_out(.:format)
new_user GET /users/new(.:format)
edit_user GET /users/:id/edit(.:format)
user GET /users/:id(.:format)
This is routes.rb
devise_for :users, :controllers => { :registrations =>
''users/registrations'' }
resources :companies
resources :users
resources :companies do
resources :users
end
I think the routes are getting confused somehow. Because when I click on
Create New User button, it seems me to the Sign...
2011 Jun 13
0
Devise Authorization Error
...inking this might be a namespace problem or
something but I''m not sure.
Here is the relevant code:
--- routes.rb ---
# Root
root :to => "content#index"
# Admin Controllers
namespace ''admin'' do
root :to => "admin#index"
# AdminController
devise_for :admin, :path=> '''', :path_names => {:sign_in =>
''login'', :sign_out => ''logout''}
resources :admin
end
# UsersController
devise_for :users, :path_names => {:sign_in => ''login'', :sign_out =>
''logou...
2011 May 06
3
Rails 3 Routing problems
...T "uploads".* FROM
"uploads" [0m
Rendered uploads/_upload.html.erb (0.0ms)
Rendered uploads/_upload.html.erb (0.0ms)
Rendered uploads/_upload.html.erb (0.0ms)
Rendered uploads/index.html.erb within layouts/application
This my config/routes
Uploader::Application.routes.draw do
devise_for :users
resources :users do
resources :uploads
end
root :to => ''users#index''
##class UsersController < ApplicationController
def show
@user = User.find
end
#views/users/show.html.erb
<div>
<% @user.email %>
<h3 id="photos_count">...
2012 Sep 16
1
“Routing Error No route matches {}” when omniauth failed on registration
...ion.config.middleware.use OmniAuth::Builder do
#...
provider :identity, on_failed_registration: lambda { |env|
IdentitiesController.action(:new).call(env)
}
end
config/routes.rb
Wie::Application.routes.draw do
root to: ''categories#index''
ActiveAdmin.routes(self)
devise_for :admin_users, ActiveAdmin::Devise.config
match ''auth/:provider/callback'', to: ''sessions#create''
match ''auth/failure'', to: ''sessions#failure''
match ''signout'', to: ''sessions#destroy'', as...
2011 Jun 11
1
Having a problem adding a foreign key
...es for your model
attr_accessible :email, :password, :password_confirmation,:firstname,:lastname,:school,:major,:sex,:zipcode
end
ROUTE
Campus::Application.routes.draw do
get "book/index"
get "book/edit"
get "book/new"
get "home/edit"
devise_for :users
resources :book
root :to=> "home#index"
match ''/book/new'' =>"home#index"
end
DATABASE SCHEMA
ActiveRecord::Schema.define(:version => 20110609055608) do
create_table "books", :force => true do |t|
t.text "tit...
2013 Aug 29
4
linkedin gem
Hi,
I am following this post *
http://www.sitepoint.com/ruby-social-gems-linkedin/* for using linked gem
and API for getting profile and other stuff
But at the end I am getting this error:
=> Booting WEBrick
=> Rails 3.2.13 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
2010 Nov 10
0
Devise - Configuring the Routes fine for Controller Inheritance
Hi!
Here''s what I added to my config/routes.rb:
devise_for :users, :controllers => {:invitations =>
"invitations", :sessions => "sessions"}
This doesn''t work, if I try to sign in I get a template missing error.
How do you configure this for controller inheritance for invitations
and sessions? And make the routes in t...
2010 Nov 12
1
Devise after_sign_up_path_for - how to?
...ationsController < Devise::RegistrationsController
def after_sign_up_path_for(resource)
puts "If I coould see this..."
redirect_to account_created_path
end
end
I have the views for users/registrations as instructed by the
documentation.
In routes I have:
devise_for :users, :controllers => { :registrations =>
"users/registrations" }
match "/account_created" => "info#account_created", :as =>
:account_created
root :to => "accounts#index"
But after sign up it always goes to root. Not to the account created...
2012 Apr 02
0
uninitialized constant UserController
...t; "/"
return false
end
end
also, ''controllers/admin/user_controller.rb''
class Admin::UserController < Admin::AdminApplicationController
active_scaffold :user
end
I am guessing that the problem is routes.rb, which is
Takibou::Application.routes.draw do
devise_for :users
resources :projects
root :to => ''projects#index''
match '':controller(/:action(/:id))(.:format)''
scope ''admin'' do #HERE!!!!!
resources :user
end
end
Could anyone help me for the error?
soichi
--
Posted via http://...
2012 Sep 05
0
Generate devise session controller
...controller.How can i generate devise session controller.
I have user.rb model.
Steps which i made:
1. Generate rails g controller session
2. Session controller generated
3. Changes the text like,
class Users::SessionsController < Devise::SessionsController
end
4.In routes i have changed,
devise_for :users, :controllers => { :sessions => "users/sessions" }
While execute i got an error:
Routing Error
uninitialized constant Users
Try running rake routes for more information on available routes.
Please advice.
--
You received this message because you are subscribed to t...
2012 Dec 12
1
Devise route for confirmation error with :locale
Rails 3.1.3
I have setup devise and i18n . In routes.rb
scope "/:locale" do
devise_for :users, :controllers => { :registrations =>
''registrations'' }
...
end
But in the process of confirmation,
No route matches {:action=>"create",
:controller=>"devise/confirmations",
:confirmation_token=>"W65sGSMU9TNQwJDRzNzV"}...
2011 Mar 01
6
render :collection calling partial with phantom object?
...straightforward has_many / belongs_to
relationship:
class Premise < ActiveRecord::Base
has_many :metered_services, :dependent => :destroy
...
end
class MeteredService < ActiveRecord::Base
belongs_to :premise
...
end
and nested routes to match:
Demo::Application.routes.draw do
devise_for :users
resources :premises do
resources :metered_services
end
...
end
I want to show/edit the metered services on the same page as premise
edit page, so my views/premises/edit.html.erb file has this line:
<% Rails.logger.debug("== #{@premise.address} has
#{@premise.metered_servi...
2012 Oct 23
0
route problem
Hello
I have this routes.rb
Tamara::Application.routes.draw do
ActiveAdmin.routes(self)
devise_for :admin_users, ActiveAdmin::Devise.config
resources :users
resources :category do
resources :berichten
end
end
So I thought that localhost:3000/<category>/bericht/new I could write a new
bericht which is stored in the <categoryname>
But when I look at rake routes I don...
2013 Oct 02
2
When overriding the registration controller from devise, is it possible to access the newly created
...def create
super
create_folder
end
def update
super
end
def create_folder
path = Pathname.new('':rails_root/tmp/'')
directory_name = ":current_user"
Dir.mkdir(path, directory_name) unless File.exists?(directory_name)
endend
routes.rb
devise_for :users, :controllers => {:registrations => "registrations"}
I followed this<http://stackoverflow.com/questions/3546289/override-devise-registrations-controller> to
override the registration controller.
1. Should I leave it there or move it to the create action? Instead o...