Displaying 12 results from an estimated 12 matches for "registrationscontrol".
2010 Dec 17
1
flash[;notice] not display after redirection
I read all previous posts about the same subject in Devise group but
couldn''t find any answer, so iy may not be related to Devise , so
I debugged it ..
.
class Users::RegistrationsController <
Devise::RegistrationsController
..
# POST /resource/sign_up
def create
build_resource
if resource.save
if resource.active?
set_flash_message :notice, :signed_up
sign_in_and_redirect(resource_name, resource)
else
set_flash_message :notice,...
2011 Aug 09
2
Devise AssociationTypeMismatch
..."email\":\"test01-J0of1frlU80@public.gmane.org\", \"role\":\"2\", \"name\":
\"name01\", \"password\":\"passwd\"}}" http://127.0.0.1:3000/users
and get the following error:
ActiveRecord::AssociationTypeMismatch
in RegistrationsController#create
Role(#70259472646000) expected, got String(#70259436671420)
I also tried using \"role\":\"member\"
I think the problem is how I am passing in the role, but I am unsure
what else to try.
Thanks
--
You received this message because you are subscribed to the Google G...
2010 Nov 12
1
Devise after_sign_up_path_for - how to?
Hi,
I''m new to devise and I''m having a problem overwriting a controller.
After sign-up I want the user to go to a static page.
In the controllers folder I have created
users/registrations_controller.rb
class Users::RegistrationsController < 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 :u...
2012 Jan 26
0
Show action with Devise
Hi, Devise has edit and new views for registrations, I''d like to add a show
view to display that information.
How can I do that?
If I overwrite the controller RegistrationsController <
Devise::RegistrationsController, it says: "Missing template
registrations/show, ...", but I want to render the view that is inside
users/registrations (the generated view for "rails generate devise:views
users") that I just added, so users/registrations/show.html.erb.
T...
2012 May 17
0
Two layouts in one mailer
Hi all,
I''m having problems figuring out how to know which mailer method is being
invoked in the layout callback.
In my controller, I have code like this and its working great:
class Users::RegistrationsController < Devise::RegistrationsController
layout :devise_or_application
def devise_or_application
["edit", "update", "destroy"].include?(params[:action]) ?
"application" : "devise"
end
end
Now I need the same thing for my mailer...
2011 Jul 14
10
Devise confusing routes
I had a similar problem yesterday.
I would go to the root of my site and I would get a Too Many Redirects
message. It seems like there was an infinite loop. After struggling for
over an hour yesterday late at night, it seemed like I fixed it.
But now, when I want to create a New User, it''s redirecting me to the
Sign In screen. Seems like I didn''t fix the problem completely.
I
2013 Oct 02
2
When overriding the registration controller from devise, is it possible to access the newly created
...create a folder right after a user registers, so I override
the create action on the registration controller (devise) but I don''t know
how to access the newly created user in order to create the folder with
it''s name to upload files later.
So far I''ve got this:
class RegistrationsController < Devise::RegistrationsController
def new
super
end
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, dir...
2010 Aug 19
0
Rails - Devise - Warden and InvalidAuthenticityToken
Hi
I''ve just uploaded my new website to my server and, after a couple of
teething problems, seem to be hitting problems when I am using devise
and warden to authenticate users etc.
The following is the error message with sensitive information removed:
Processing RegistrationsController#create (for 81.111.90.194 at
2010-08-19 21:35:43) [POST]
Parameters: {"commit"=>"Sign up", "action"=>"create",
"authenticity_token"=>"XXXXXXXREMOVEDXXXXXXX",
"controller"=>"registrations", "user&qu...
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",
2014 Apr 21
0
Unpermitted Parameters - Rails 4
...oller where i do have:
"
def sign_up_params
params.require(:user).permit(:email,:first_name,
:last_name,:mobile, :birthday, :current_password,
:password,:password_confirmation)
end
"
and everytime i try to sign up I get the following message:
Processing by Devise::RegistrationsController#create as HTML
Parameters: {"utf8"=>"✓",
"authenticity_token"=>"p9qVwZp/rDtJyvfV2TVdNXmh29JEoTs9SbyLHyNSq44=",
"user"=>{"first_name"=>"Joao", "last_name"=>"Miguel", "birthday"=>...
2011 Dec 20
4
Custom Devise Controller
Hi Guys,
I was wondering if sb could help me.
I have the following problem:
-I want to create a complex form using railscast tutorial (
http://railscasts.com/episodes/73-complex-forms-part-1). Well, to perform
this I need to update my controller(in this case the controller responsible
to manipulate user).
But I''m using Devise gem and I don''t know how I could manipulate the
2013 Jun 25
6
creating an account with a username in devise
Hello, all. I have followed these links and have enabled a (current)
user to login with a username:
http://railscasts.com/episodes/209-introducing-devise
http://railscasts.com/episodes/210-customizing-devise
https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-sign-in-using-their-username-or-email-address
I want to allow a user to sign up with a username but am getting these