en en en en id en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en sk es en en en en en en en en fr en en en en en ru en en en en en en en en en en en en en en en en en en en en en pt en en en en en en en
As I stumble through the world of linux, I've decided to log new tricks I learn because I often forget. I decided to share the log because…. eh, why not.
Formatting Numerical Input with Rails
Kubuntu 16.04 GUI Audio Controls not working
Polymorphic Associations The Smart Way: Using Global Ids
Get Firefox to display warning message when exiting multiple tabs
Cheatsheet for viewing commits/branches in git
jaehoo on Kubuntu 16.04 GUI Audio Contro…
jaehoo on Kubuntu 16.04 GUI Audio Contro…
BennyBeat on How to download a file from so…
fastrapidleech.com on How to download a file from so…
neanderslob on How to download a file from so…
Adding a devise user or admin in a Heroku app
February 18, 2015February 18, 2015 neanderslobadd, devise, heroku, rails, ruby, ruby on rails, userLeave a comment
To add a devise user on a Heroku site we combine two commands
Command 1: With devise a person can enter the following into their rails console to create a user: User.new(:email => "user@name.com", :password => 'password', :password_confirmation => 'password')
Command 2: To run commands in the Heroku terminal, simply go into local directory of the corresponding app and type heroku run [whatever you want to run]
So if we put those together we get the following, assuming that your user model is in fact called User:
Change your directory to your app: cd ~/yourapp
Enter into the rails console on Heroku with the following: heroku run rails c
Run the create user code: U=User.new(:email => "user@name.com", :password => 'password', :password_confirmation => 'password')
Finally, if you want to do this for a separate admin model, simply replace User in the instructions above with Admin (provided of course that’s what your separate admin model is called; if not adjust accordingly).
That’s it! You should be good to go!
Adding a devise user or admin in a Heroku app
Create a free website or blog at WordPress.com.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.