Re: [Rails] Adding record with has_many relationship .with dynamic column_name

2015-05-22 Thread kranthi kumar
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

Re: [Rails] Adding record with has_many relationship .with dynamic column_name

2015-05-22 Thread Colin Law
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

Re: [Rails] Rake commands return blank console`

2015-05-22 Thread Colin Law
On 22 May 2015 at 09:47, Naveen Goud naveengou...@gmail.com wrote: can you please call me back What? Who? Colin On Fri, May 22, 2015 at 1:20 PM, Colin Law clan...@gmail.com wrote: On 22 May 2015 at 06:56, Binu A. li...@ruby-forum.com wrote: Rake test Rake db:migrate Those won't work

Re: [Rails] Rake commands return blank console`

2015-05-22 Thread Colin Law
On 22 May 2015 at 06:56, Binu A. li...@ruby-forum.com wrote: Rake test Rake db:migrate Those won't work as it should not be a capital R bundle exec rake test That should work. Can you copy/paste the full output from the console, including the command please. Also the output from bundle -v

Re: [Rails] Rake commands return blank console`

2015-05-22 Thread Naveen Goud
can you please call me back On Fri, May 22, 2015 at 1:20 PM, Colin Law clan...@gmail.com wrote: On 22 May 2015 at 06:56, Binu A. li...@ruby-forum.com wrote: Rake test Rake db:migrate Those won't work as it should not be a capital R bundle exec rake test That should work. Can you

[Rails] Re: How to generate Rails models from database schemas

2015-05-22 Thread Elizabeth McGurty
You don't always have to work with Rails functionality to utilize a database, not sure always true for PostgreSQL. The critical aspect is how you define your database connectivity in config/database.yml. Perhaps helpful, check out brilliant Ryan Bates' RailsCast:

Re: [Rails] How to generate Rails models from database schemas

2015-05-22 Thread Colin Law
On 22 May 2015 at 20:44, kenatsun kenat...@gmail.com wrote: I'm evaluating Rails (vs Django) for a new project. A requirement of this project is that the Rails app(s) be able to work with a database (PostgreSQL, in case that matters) whose schemas (table definitions) have been created and,

Re: [Rails] How to generate Rails models from database schemas

2015-05-22 Thread Hassan Schroeder
On Fri, May 22, 2015 at 12:44 PM, kenatsun kenat...@gmail.com wrote: I'm evaluating Rails (vs Django) for a new project. A requirement of this project is that the Rails app(s) be able to work with a database (PostgreSQL, in case that matters) whose schemas (table definitions) have been

Re: [Rails] How to generate Rails models from database schemas

2015-05-22 Thread Scott Ribe
On May 22, 2015, at 2:32 PM, kenatsun kenat...@gmail.com wrote: My question is about how to align the Rails contents (model definitions) with the database contents (table definitions), so that the app can read from and write to the tables. Largely, you just ignore migrations and mostly

Re: [Rails] Condition on fields_for

2015-05-22 Thread Colin Law
On 22 May 2015 at 20:28, Elizabeth McGurty emcgur...@gmail.com wrote: Walter, Stewart Many thanks to you. Definitely making so much progress here. All seems to be going really well, but I remain stumped at a critical point Given the model, I pass from the controller @parent =

[Rails] Re: How to generate Rails models from database schemas

2015-05-22 Thread kenatsun
I know how to *connect *a Rails app to a PG database. My question is about how to align the Rails *contents *(model definitions) with the database contents (table definitions), so that the app can read from and write to the tables. It think perhaps you're answering yes to my question 2 -

[Rails] How to generate Rails models from database schemas

2015-05-22 Thread kenatsun
I'm evaluating Rails (vs Django) for a new project. A requirement of this project is that the Rails app(s) be able to work with a database (PostgreSQL, in case that matters) whose schemas (table definitions) have been created and, over time, will be modified independently of the Rails app(s).

Re: [Rails] Rake commands return blank console`

2015-05-22 Thread Naveen Goud
i want to learn Ruby can you please help me On Fri, May 22, 2015 at 2:24 PM, Colin Law clan...@gmail.com wrote: On 22 May 2015 at 09:47, Naveen Goud naveengou...@gmail.com wrote: can you please call me back What? Who? Colin On Fri, May 22, 2015 at 1:20 PM, Colin Law

Re: [Rails] Condition on fields_for

2015-05-22 Thread Elizabeth McGurty
THANKS! Sorry I responded to Walter before I read this -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To

Re: [Rails] Condition on fields_for

2015-05-22 Thread Elizabeth McGurty
Thanks, but I think that I figured it out In parent AR, attr_accessible :addresses_attributes has_many :addresses ### Pretty sure should be plural for has_many, and singular for has_one accepts_nested_attributes_for :addresses Then in the view I have (abbreviated) form @parent_object do

Re: [Rails] Rake commands return blank console`

2015-05-22 Thread Colin Law
On 22 May 2015 at 09:56, Naveen Goud naveengou...@gmail.com wrote: i want to learn Ruby can you please help me Start a new thread with an appropriate subject, your request is nothing to do with subject of this thread, which is Rake commands return blank console Colin -- You received this

[Rails] Re: Make sure that 'gem install web-console -v '2.1.2' ` succeeds before bundling

2015-05-22 Thread Shitian Long
How did you fix this ? On Monday, May 4, 2015 at 10:52:04 PM UTC+2, Bailey J wrote: I pass rails new and everything looks like it works until I get to this Gem::RemoteFetcher::FetchError: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server session ticket A (

Re: [Rails] Condition on fields_for

2015-05-22 Thread Elizabeth McGurty
Walter, Stewart Many thanks to you. Definitely making so much progress here. All seems to be going really well, but I remain stumped at a critical point Given the model, I pass from the controller @parent = Parent.object All of the field_for aspects are working really beautifully. But in