Advertisement
Guest User

Untitled

a guest
Jul 14th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. ActiveRecord::Base.establish_connection(
  2. :adapter => "mysql2",
  3. :host => "localhost",
  4. :username => "root",
  5. :password => "root",
  6. :database => "my_database"
  7. )
  8.  
  9.  
  10. Base.connection.insert("INSERT INTO my_database(fields) VALUES('value')")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement