[Rails] Re: 2.3 Nested Forms, dynamically add an attribute

2009-03-27 Thread John Small
Fernando Perez wrote: > If you are concerned with the 15 loc added to the model for the > new_whatever_attribute= and so on, well actually using metaprogramming, > you easily extract this into a plugin and share the code between various > models. I think I will follow this path instead of usin

[Rails] Re: 2.3 Nested Forms, dynamically add an attribute

2009-03-27 Thread Fernando Perez
> Or I'll just set up the view component as I did in Rails 2.2. At least > I don't have to add setters to the model and Rails 2.3 manages that > automatically. When Rails 2.3 got released, the first thing I didn't was try to migrate my former nested form integration to Rails' builtin system, but

[Rails] Re: 2.3 Nested Forms, dynamically add an attribute

2009-03-27 Thread tilt
Thanks very much, yeah I'll try to deal with that subject in time. In the meanwhile I'd be happy enough to find a Rails-like way to implement a "New" Button which calls a controller action and passes the value of a select tag to that action. That's not the nicest workaround, but it should work. Or

[Rails] Re: 2.3 Nested Forms, dynamically add an attribute

2009-03-26 Thread John Small
> I'd be very thankful for any advice!! Perhaps there are good examples > on the web? I tried to understand Eloy's example, but it's quite > difficult. > > Best regards Yes, it's very much on the level of "here's how to ride a bike, now go off and race a Formula 1 car, remember to break on the