Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module A
- class B < ActiveRecord::Base
- end
- end
- require 'active_record'
- ActiveRecord::Base.establish_connection(
- adapter: 'postgresql',
- database: 'xxxx',
- host: 'localhost',
- username: 'xxxx',
- password: 'xxxx'
- )
- module A
- class B < ActiveRecord::Base
- def self.do_something
- A::B.all.each do |record|
- #do something
- end
- end
- end
- end
- end
- A::B.do_something
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement