Re: [Rails] case study

2013-01-31 Thread Colin Law
On 30 January 2013 23:08, oto iashvili wrote: > hi > > thanks for answer sorry I quite new in RoR. If I do how u said, will I have > to validate "manually" all the attributes for details ? If you are new to rails there are probably many other basic features that you are not aware of. I suggest y

Re: [Rails] case study

2013-01-30 Thread Jim Ruther Nill
On Thu, Jan 31, 2013 at 7:08 AM, oto iashvili wrote: > hi > > thanks for answer sorry I quite new in RoR. If I do how u said, will I > have to validate "manually" all the attributes for details ? > Now that you've asked that, I'm not sure. You can try to use validates_associated and use a before

Re: [Rails] case study

2013-01-30 Thread oto iashvili
hi thanks for answer sorry I quite new in RoR. If I do how u said, will I have to validate "manually" all the attributes for details ? Le mercredi 30 janvier 2013 15:27:43 UTC+1, jim a écrit : > > > On Wed, Jan 30, 2013 at 6:48 PM, oto iashvili > > > wrote: > >> I want to do >> @ad = Ad.attri

Re: [Rails] case study

2013-01-30 Thread Jim Ruther Nill
On Wed, Jan 30, 2013 at 6:48 PM, oto iashvili wrote: > I want to do > @ad = Ad.attributes(params[:ad]) > maybe Im wrong, but as I understood about polymorphic in rails, this would > thow an error say that ad_real_estate_details does not exist > > as they explained here http://stackoverflow.** > c

Re: [Rails] case study

2013-01-30 Thread oto iashvili
I want to do @ad = Ad.attributes(params[:ad]) maybe Im wrong, but as I understood about polymorphic in rails, this would thow an error say that ad_real_estate_details does not exist as they explained here http://stackoverflow.com/questions/3969025/accepts-nested-attributes-for-with-belongs-to-

Re: [Rails] case study

2013-01-29 Thread Jim Ruther Nill
On Tue, Jan 29, 2013 at 7:41 PM, oto iashvili wrote: > Hi, > > thanks for answer. My pb with polymorphic is that I would have to create > first in db a ligne for ad_real_estate_details and then create my ad, what > is non sense for me, in terms of logic. > and it might brings some pb as I read the

Re: [Rails] case study

2013-01-29 Thread oto iashvili
Hi, thanks for answer. My pb with polymorphic is that I would have to create first in db a ligne for ad_real_estate_details and then create my ad, what is non sense for me, in terms of logic. and it might brings some pb as I read there http://stackoverflow.com/questions/3969025/accepts-nested-

Re: [Rails] case study

2013-01-28 Thread Nicolas Desprès
On Sun, Jan 27, 2013 at 11:27 PM, oto iashvili wrote: > hi, > > i' trying to re-create my project from php to rails. But now Im faced with > a pb to witch I had solution with php, but I cant figure how to make it > work with rails > > here my tables > > ads > id > category_id > title > tex

Re: [Rails] case study

2013-01-27 Thread Jim Ruther Nill
On Mon, Jan 28, 2013 at 6:27 AM, oto iashvili wrote: > hi, > > i' trying to re-create my project from php to rails. But now Im faced with > a pb to witch I had solution with php, but I cant figure how to make it > work with rails > > here my tables > > ads > id > category_id > title > text

[Rails] case study

2013-01-27 Thread oto iashvili
hi, i' trying to re-create my project from php to rails. But now Im faced with a pb to witch I had solution with php, but I cant figure how to make it work with rails here my tables ads id category_id title text ad_real_estate_details id ad_id nb_room floor ad_car_details i