ruby on rails - heroku current transaction is aborted -
I have a small free
The app stops working from the intestine and on the screen Displays the default perforated error page. When I look at logs, I see the following:
ActiveRecord :: StatementInvalid (PGError: Error: the current transaction has been aborted, ignored until the end of the transaction block To order: SELECT * FROM "users" WHERE ("user". "Password" = e 'and' user '. "Userid" = e' ') 1): app / model / user.rb: 5: Code> authentication 'application / controller /admin_controller.rb:6:in login'
In my controller I am just doing the following:
< Pre> user = sub Ogkrta. Certify (params [: storeid], params [: password])
and in the user model:
def self.authenticate (userid, password) Error message I believe that some connections are left hanging and never closed. Is it ever a matter of ruby app? There are several places in my app where I am using find_by_sql. Do we need to explicitly close the connection?
Like this:
@ sqlstmmt1 = "Enter in address (\" line1 \ ", \" line2 \ ", city (parameter [: line1] + "[Parameters: [+ Line 2] +" ',' "+ Parameters [: City] +" ',' "+ Parameter [: State] +" ',' "+ Ultimate: ZIP] + "',' '+ [[County] +"' ') "SQL = Activacord :: Base.connection (); Sql.begin_db_transaction
Because of the error I feel that when I try to insert Utf-8 characters, I think that your password is foreign Shr may Biteedblu: You must Bcni from a SQL-string used, parameter to embed [: Baaad anything].
Comments
Post a Comment