Rails community doesn't like deriving business logic to the database, but in some cases stored procedures are very helpful and many people trying to use them in Rails, however it's not so easy as you can imagine. Running ActiveRecord::Base.connection.execute("CALL proc01") will give you a bunch of errors in different cases. Let's say your procedure returns some result set. So running that procedur