Sent from my iPhone

On May 16, 2011, at 3:27 AM, Mauro <[email protected]> wrote:

> On 14 May 2011 14:09, Bryan Crossland <[email protected]> wrote:
>> Sent from my iPhone
>> On May 13, 2011, at 3:31 PM, Mauro <[email protected]> wrote:
>> 
>> On 12 May 2011 17:13, Mauro <[email protected]> wrote:
>> 
>> I have a form with some fields.
>> 
>> In one of these ones the user can put data of type address, like
>> 
>> "example street" and so on.
>> 
>> I want that the user can select from a list of streets but these
>> 
>> streets are in a table from a Oracle database.
>> 
>> I can connect the form field to the street field of the Oracle table?
>> 
>> 
>> no advices?
>> 
>> 
>> The question is pretty basic and answered by any tutorial or Rails guide out
>> there. Yes is the answer. Your controller calls the model for the other
>> table and returns the list of streets to populate a select box on a form.
> 
> 
> But how can I associate the model with the preexisting oracle table?
> 

Create a model that has same name as your table an inherit ActiveRecord for it.

Example
Table: my_table

Model: my_table.rb

class MyTable < ActiveRecord::Base

end


B.



> -- 
> 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.
> 

-- 
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