Forum: Ruby on Rails Accessing Oracle Package in models

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
698fda27afd1c60906a58b8e441d8350?d=identicon&s=25 Anand Srinu (mail2sanand)
on 2008-10-06 17:56
Hi All,

Just wanted to know if we can write models for the Oracle packages.
Like, if I have an oracle package named "user_pkg", and a function
function_1 in it, can I have a model under the name "UserPkg" and then
access the function "function_1", in it.

If creating a model is not the right way, how to access those packages
in the models?

Regards,
Anand.
698fda27afd1c60906a58b8e441d8350?d=identicon&s=25 Anand Srinu (mail2sanand)
on 2008-10-07 15:19
Hi,
  Refering to the above example, I was able to create a model named
user_pkg.rb (class UserPkg) and I am using a find_by_sql command to
access the function "function_1". I am able to get the result, but the
problem I am facing is that the rails tells that

"DESC user_pkg" failed; not a table or view.

Just wanted to know if I can tell rails that this model user_pkg.rb is
not a table (Without using the BaseWithoutTable plugin)

Please help me in this issue.

Thanks in advance.
Anand
This topic is locked and can not be replied to.