Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## If I were to have the following model:
- class RemoteUser < ActiveRecord::Base
- self.table_name = "user"
- ActiveRecord::Base.establish_connection(
- :adapter => "mysql",
- :host => "example.com",
- :username => "user",
- :password => "pass",
- :database => "database1"
- )
- end
- ## shouldn't I be able to interact with it in irb?
- lol-computer:~/work/restchan user$ script/console
- Loading development environment.
- >> n = Remote_user.find(1)
- LoadError: Expected script/../config/../config/../app/models/remote_user.rb to define Remote_user
- from ./script/../config/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:239:in `load_missing_constant'
- from ./script/../config/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:360:in `const_missing'
- from ./script/../config/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:372:in `const_missing'
- from (irb):1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement