Advertisement
Guest User

Untitled

a guest
Oct 18th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. class AmethystModel < ActiveRecord::Base
  2.  
  3. @amethyst_conn = ActiveRecord::Base.establish_connection
  4. (
  5. {
  6. :adapter => 'mysql2',
  7. :database => 'RemouteDB',
  8. :host => 'examle.remoutehost.com',
  9. :username => 'root',
  10. :password => "root"
  11. }
  12. )
  13. end
  14.  
  15. def self.get_all_from_amethyst
  16. sql = sanitize_sql(["SELECT * from RemouteDB.param_delay order by sequence"])
  17. @all_amethyst = @amethyst_conn.connection.execute(sql)
  18. end
  19.  
  20. ActionView::Template::Error (Mysql2::Error: Table 'RemouteDB.param_delay' doesn't exist: SELECT MAX(sequence) as max from RemouteDB.param_delay)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement