I have Devise working. I have roles for users working. I even added custom fields to the User model and it seems that now everything is working fine. So people can now subscribe using the Sign Up form provided by Devise. But now I need Admins, to add users. Of course, I can''t use the Sign Up form for that. If I just use a regular User model, their passwords are blank. Or maybe the form won''t even work because it will try to use the Registration Controller instead of the User controller (been there, done that), so it won''t work. This is the general idea of what I''m looking for. This is my objective. -------------------------------------------------------- Admin creates a User. App sends Invitation Email to new User. User clicks on link provided in the email. Links takes new User to a webpage where he pick his password. User can now login to the app. -------------------------------------------------------- I''ve been reading several articles online but I can''t find exactly what I''m looking for. http://craiccomputing.blogspot.com/2011/02/rails-devise-and-custom-user-models.html http://stackoverflow.com/questions/4491884/rails-devise-two-different-methods-for-new-users Can anybody point me to the right direction? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Wouldn''t be easier to just create the authentication from scratch? Any thoughts from anybody that has been through that? http://railscasts.com/episodes/250-authentication-from-scratch -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
It depends. Devise is a well-tested and powerful authentication solution. You need to decide if it''s overkill or not for what you are trying to achieve. Regarding invitations, do you know: https://github.com/scambra/devise_invitable ? looks like it does what you want.. On Jul 15, 12:34 am, "Leonel *.*" <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Wouldn''t be easier to just create the authentication from scratch? Any > thoughts from anybody that has been through that? > > http://railscasts.com/episodes/250-authentication-from-scratch > > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I think I''ve done something simple like this to arbitrarily create a user with Devise: class User < ActiveRecord::Base def self.create_new_user(email, password) user = User.new({ :email => email, :password => password }) return user.save end end That does require the admin to choose a password. I have an algorithm to create a random 10-character string that I mail to the user with the invite. The user can change that if they want. On Thu, Jul 14, 2011 at 6:49 PM, frankblizzard <tmaximini-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> It depends. > Devise is a well-tested and powerful authentication solution. You need > to decide if it''s overkill or not for what you are trying to achieve. > Regarding invitations, do you know: https://github.com/scambra/devise_invitable > ? > looks like it does what you want.. > > > > > > On Jul 15, 12:34 am, "Leonel *.*" <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> Wouldn''t be easier to just create the authentication from scratch? Any >> thoughts from anybody that has been through that? >> >> http://railscasts.com/episodes/250-authentication-from-scratch >> >> -- >> Posted viahttp://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.