-
-
Save edavis10/975615 to your computer and use it in GitHub Desktop.
it doesn't have to be complicated
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Append the user's .railsrc.rb to the load modules, that way it's loaded | |
# after the rails ENV and everything else... | |
if $0 == 'irb' && ENV['RAILS_ENV'] | |
IRB.conf[:LOAD_MODULES] << File.dirname(__FILE__) + '/.railsrc' # ~/.railsrc.rb, requires .rb | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module UserPasswordResetter | |
def new_password_from_irb=(new_password) | |
self.password = self.password_confirmation = new_password | |
end | |
end | |
User.send(:include, UserPasswordResetter) unless User.included_modules.include?(UserPasswordResetter) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment