I am new to ruby on rails . I am trying to upload the data to any model ,
through file. so they specify the model name , and the data which needs to
be dumped in to database . i am parsing each line of the file and trying to
add the records . I am facing problem adding the has_many relations
On 22 May 2015 at 07:36, kranthi kumar kranthi.3...@gmail.com wrote:
I am new to ruby on rails . I am trying to upload the data to any model ,
through file. so they specify the model name , and the data which needs to
be dumped in to database . i am parsing each line of the file and trying to
I know that we can add records like
record.posts Post.find(1);
but how can add the same Post.find(1) record if I have a variable that
contains the name posts
I have something like this
column_name = posts
record[column_name] Post.find(1);
it is throwing an error
NoMethodError
On 21 May 2015 at 13:48, kranthi kumar kranthi.3...@gmail.com wrote:
I know that we can add records like
record.posts Post.find(1);
but how can add the same Post.find(1) record if I have a variable that
contains the name posts
I have something like this
column_name = posts
4 matches
Mail list logo