Hi,
I have been trying to use RESTful Authentication with ActiveWarehouse ETL.
To put it simply, I want to access the id of the currently logged in user
during the ETL. I would like it to populate a user_id column.
I have a controller which runs
bb = IO.popen("cd db/etl \n etl trans.ctl")
b = bb.readlines
puts b.join
This works well enough (for now). The user can click a button and
trans.ctlwill be executed.
With RESTful Authentication, I can use the current_user method in my views
to access the current user. I would like something similar for the control
files.
I am thinking that passing an argument/parameter would be the best way to do
this.
Any suggestions?
Paul
PS. I have also tried using the following in my controller:
ETL::Engine.realtime_activity = true
ETL::Engine.process('db/etl/trans.ctl')
This sort of works. The ctl is executed, but it can't find
database.ymlbecause the current directory is not db/etl. Even with
this method, I cannot
access current_user or session[:user].
_______________________________________________
Activewarehouse-discuss mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/activewarehouse-discuss