Notes to self
Thursday, February 21, 2008
require and load won't reload the file with reload! in rails console
I have the statement "require 'primary_user' " in one of my models of my Rails application. Usually whenever I do a 'reload!' in my rails console, it reloads all the models and their associates files so that any changes to code can be seen in the console. But there is a catch to that reload!. It doesn't reload any of the files loaded using the 'require' statement. So my 'primary_user' file wasn't getting reloaded. Strange. But that's how it works. I tried changing 'require' to 'load' but no use.
Posted by Mandovi at 2:34 AM
- square brackets  class method of Hash
- Preventing sensitive data from being logged in Rai...
- Route Globbing
- String: extract a single character
- require and load won't reload the file with reload...
- Rails without a database
- binding in ruby
- ActiveRecord tricks - :include and :select options...
- Convert String to Range
- Prevent a class from instantiating
- SQL joins explained
- ▼ February (12)