Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CQM < ActiveRecord::Base
- self.abstract_class = true
- establish_connection(
- :adapter => "mysql2",
- :host => "localhost",
- :username => "root",
- :password => "root",
- :database => "cqm_development"
- )
- end
- class Abend < CQM
- end
- class BlueIdeas < ActiveRecord::Base
- self.abstract_class = true
- establish_connection(
- :adapter => "mysql2",
- :host => "localhost",
- :username => "root",
- :password => "root",
- :database => "blue-ideas_development"
- )
- end
- class Comment < BlueIdeas
- end
- Comment.transaction do
- Comment.create :user_id => 1, :idea_id => 1, :body => "ROLLBACKS!"
- Abend.transaction do
- Abend.create :job_id => 1, :return_code => 1, :abended_on => Time.now
- end
- raise "oh noes!"
- end
Add Comment
Please, Sign In to add comment