Created
March 8, 2011 19:35
-
-
Save gmgent/860862 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def forecast | |
| x = params[:revplan_id].to_i | |
| @revplan = Revplan.find(x) | |
| sql = ActiveRecord::Base.connection(); | |
| sql.execute "SET autocommit=0"; | |
| sql.begin_db_transaction | |
| execution_string="call sp_generate_forecast(#{Time.now.month}, #{Time.now.year}, _ | |
| #{x}, #{month_days(Time.now.month)})" | |
| result = sql.execute(execution_string) | |
| sql.commit_db_transaction | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment