You should probably have the Person have an Address, that way you can
nest the Address creation form within your Person form.
Logically, you shouldn't nest the form of an Address within a Person
form since it's the Address that owns the Person according to your
current model...
On Apr 29, 2:18 pm, Sereno Mendes <li...@ruby-forum.com> wrote:
> Hi all,
>
> I have a relationship in this form: A person belongs to an address and a
> address can have many persons like below:
>
> class Person < ActiveRecord::Base
> belongs_to :address
> end
>
> class Address < ActiveRecord::Base
> has_many: persons
> end
>
> The ideia behind this is, if two or more persons share the same address,
> isn't necessary create two indetical rows in the database. But, like i'm
> new in the rails development, i want to create a form for person
> creation and edition that wraps the creation of related address, as a
> nested form. I already made a search for a solution for this problem,
> but the solutions that i found in others sites are for the inverse
> associations, any idea?
>
> Thanks.
> --
> Posted viahttp://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 rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit this group athttp://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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Nirosh,
How do you migrate sqlite3 to mysql?
Please ensure that your migration is correct. When you export database into files
you need to ensure that the file format is utf compatible. If it is ASCII compatible
it wont work
Before you import the data into mysql, view the import script into a utf8 compatible
editor and see that you tamil characters are visible.
Then make sure that mysql engine is utf8 enabled. Columns defined are
utf8 compatible columns.
Cheers
Amala Singh
i have a problem with mysql.
i have developed an app witch is works on unicode based. everything
worked so far.
now i migrate the db sqlite3 to mysql then my Unicode characters
appear as ????????.
any idea to solve this problem.
nirosh
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
--
--
Nandri(Thanks in Tamil),
Amala Singh
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
i have a problem with mysql.
i have developed an app witch is works on unicode based. everything
worked so far.
now i migrate the db sqlite3 to mysql then my Unicode characters
appear as ????????.
any idea to solve this problem.
nirosh
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.