Hello,

In my app there is a one-to-many relation between members and
member_phones.
Following code works in ruby 1.8.7, rails 3.0.3 but fails on heroku.


@member = Member.new
@[email protected]_phones.build

but this works on heroku:

@member = Member.new
@member_phone=MemberPhone.new

But this way I have specify

@member_phone.save!

otherwise it is not saved in database.

Now, my problem is that if thats the way I have to go then , how do I
create a collection/hash/array of member_phones so that I can accept
mutliple member_phones on the view. Again a problem here as I can't use
formtastic gem because for one it would require a lot of custom styling
and I already have an application template for the whole application
that I have to use. And , also the hosting service which I may end up
finally end up to host my app will not allow any gems installation.
Therefore, I am stuck with default setup and javascript/jquery use to
customise my views.

Thanks.

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