On your Mac, add following lines in ~/.irbrc require ‘irb/ext/save-history’ #History configuration IRB.conf[:SAVE_HISTORY] = 1000 This will enable irb history which will let you access previous commands with up/down keys The actual history resides under ~/.irb_historyRead more "Enable history in irb and rails console"
Now that Capistrano 3 is available, it is time to upgrade your capistrano deployment setup. It is recommended to backup your old capistrano files to a directory mkdir old_capistrano mv Capfile config/deploy.rb old_capistrano cd project_dir Instead of running capify . run cap install This should create following files Capfile config/deploy/staging.rb config/deploy/production.rb By default, this should […]Read more "Capistrano 2 to Capistrano 3 upgrade"
This post is only for helping me remember the command that lets me run single test file in rails for rails test framework To run all the test methods from the test case, use $ ruby -Itest test/unit/post_test.rb To run a single test method in the test case, just add the method name $ ruby […]Read more "Running Rails Tests"
While working on a functionality, I came across a situation where I was required to update the model which had a lot of validations specified. It is possible to update a single attribute and save the record without going through the normal validation procedure using update_attribute but when you need to do it for multiple […]Read more "Rails update attributes without validations"