How to reverse a ‘rails generate’
I want to delete all the files it created and roll back any changes made, but not necessarily to the database, but more … Read more
I want to delete all the files it created and roll back any changes made, but not necessarily to the database, but more … Read more
I added a table that I thought I was going to need, but now no longer plan on using it. How should I … Read more
I have a dev Ruby on Rails database full of data. I want to delete everything and rebuild the database. I’m thinking of … Read more
To add a new pair to Hash I do: {:a => 1, :b => 2}.merge!({:c => 3}) #=> {:a => 1, :b => … Read more
How do I generate a random number between 0 and n? 17 s 17 Use rand(range) From Ruby Random Numbers: If you needed … Read more
I am using the Ruby on Rails 3.1 pre version. I like to use PostgreSQL, but the problem is installing the pg gem. … Read more
I wrongly named a column hased_password instead of hashed_password. How do I update the database schema, using migration to rename this column? 3 … Read more