Can I use stored procedures with ruby ​​on rails?

advertisements

Can I use stored procedures with ruby on rails ?

I am using mysql as database and ruby on rails.

please provide me any of the example for this.


Duplicate ? if not:

class MyRubyClass < ActiveRecord::Base
    def self.select_some_records
       connection.select_all "exec mysql_stored_proc 'argument1', 'argument2'"
    end
end

to enable use of stored procedures look at this