Here is a simple database connection, and query thats working for me;
postgre_conn = PG::Connection.open(:host => 'dbsvr', :user => 'csdashboard', :password => 'csdashboard', :dbname => 'csdashboard')
@filtered_snort_detail_query = postgre_conn.exec("SELECT * from event where timestamp >= (now() - '1 day'::INTERVAL);")
How can I tell pg to use the database.yml file for connection information?
#
#
Closed issue
#
#
I'm sorry to waist everyones time, I think I was doing this all wrong. Since this is a database function, I think it needs to be defined by a model first. Very sorry for that...