I recall having a similar problem. I believe I got around it by
overriding the table_name method on the class, e.g.:

class Vehicule < ActiveRecord::Base

 def self.table_name
  "table_a"
 end

end

Christian


On Thu, Sep 11, 2008 at 7:15 PM, Rémi Gagnon
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> When I try to run this command I got a table does not exist.
>
>>> Vehicule.get_vehicule(123,1123)
>
>
> class Vehicule < ActiveRecord::Base
>
>  set_table_name "table_a"
>
>  def self.get_vehicule( inte_no, poas_no)
>     find_by_inte_no_and_poas_no( inte_no,  poas_no)
>  end
> end
>
> It looks like if you have a custom method in your model, the
> "set_table_name" is not taken as the real table name. As soon I rename
> my model the name of the table(which is not what I want) the
> get_vehicule worked.
>
> I'm on Rails edge.
>
> Rémi
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to