[Rails] Re: adding a drop down menu to index view

2017-05-28 Thread Chris Lerum
try <%= f.collection_select( :artist, :genre_id, Genre.all, :id, :name) %> On Sunday, May 28, 2017 at 4:17:53 PM UTC-4, fugee ohu wrote: > > I wanna add a dropdown menu to my index view for the index action of my > artists_controller Trying to use collection_select but it responds undefined >

Re: [Rails] associations - one to many

2016-10-18 Thread Chris Lerum
Your line: params.require(:product).permit(:title, :template, :price, :msrp, :enddate) needs to be: params.require(:product).permit(:title, :template, :price, :msrp, :enddate, :category_id) On Tuesday, October 4, 2016 at 3:15:26 PM UTC-4, Joe Guerra wrote: > > Still unsure of what to do... this

[Rails] Re: When to add multi tenancy ?

2015-05-17 Thread Chris Lerum
You seem to answer your own question: you already know it's an architectural requirement, so I'd suggest including it from the beginning. On Friday, May 15, 2015 at 3:50:15 PM UTC-4, Leandro França wrote: Hi there, I'm building a new app that will need to have multi tenancy features and

[Rails] Re: Ruby Developer Needed

2015-05-12 Thread Chris Lerum
I've some experience rescuing projects, perhaps I could be of help. chris.le...@gmail.com On Tuesday, May 12, 2015 at 12:21:08 PM UTC-4, Jon Capp wrote: Have a project that is already in use but needs a few things finished and ongoing support. We lost our developer to another project looking

[Rails] Re: Cloud9 not creating files and directories the rails command should create

2015-05-11 Thread Chris Lerum
You must either be in the wrong directory or it's a Cloud9 issue. If you go to terminal, are the files there? On Monday, May 11, 2015 at 8:15:15 AM UTC-4, Roman wrote: I'm sorry if the following question has been asked before but I wasn't able to find the answer. I've just started going

[Rails] Re: Jquery to center: Form with multiple hidden divs -- JS will size to the smallest div....

2015-05-06 Thread Chris Lerum
This isn't rails-related, but for centering/laying out things neatly, I'd suggest using something like Bootstrap and its grid system. On Tuesday, May 5, 2015 at 12:51:42 PM UTC-4, Elizabeth McGurty wrote: ...despite monitor On Tuesday, May 5, 2015 at 12:49:05 PM UTC-4, Elizabeth McGurty

Re: [Rails] Re: FactoryGirl - can't write unknown attribute, and undefined method `name'

2015-04-30 Thread chris lerum
UTC+3, Chris Lerum wrote: In short, yes. See this lovely article; notice the conspicuous absence of any talk of changing table names: http://blog.makandra.com/2014/12/organizing-large-rails-projects-with-namespaces/ On Wednesday, April 29, 2015 at 1:59:04 PM UTC-4, Rafael Adel wrote: I can

Re: [Rails] Re: FactoryGirl - can't write unknown attribute, and undefined method `name'

2015-04-30 Thread Chris Lerum
https://github.com/chrislerum/factory setting table_name seems to be the sweet spot, working now On Thursday, April 30, 2015 at 8:01:49 AM UTC-4, Chris Lerum wrote: you could try, in the model, self.table_name = seven_gallery_photos etc. On Thu, Apr 30, 2015 at 4:09 AM, Rafael Adel

[Rails] Re: I am creating a record in a table and after creation I want to create a record in another table

2015-04-30 Thread Chris Lerum
It's to your credit that you got that working, but it's far from conventional - why not post your attempt to get associations working, with your expected result vs. actual, and you'll soon be greeted with a nice 'AHA!' moment. I bet. On Thursday, April 30, 2015 at 10:18:28 AM UTC-4, Elizabeth

[Rails] Re: FactoryGirl - can't write unknown attribute, and undefined method `name'

2015-04-29 Thread Chris Lerum
https://github.com/chrislerum/factory I tried whipping up an app with your code, the controller test passes fine for me, see if it works for you and compare. On Wednesday, April 29, 2015 at 10:32:47 AM UTC-4, Rafael Adel wrote: I'm trying to create a `photo` factory that's in a many to one

[Rails] Re: Problem with validation

2015-04-29 Thread Chris Lerum
It may help if you showed us this code of which you speak. On Wednesday, April 29, 2015 at 10:52:06 AM UTC-4, Gm wrote: Hi, I'm using a custom validation method to validate some logic. But I realized that the database query is running two times. So the database is being called twice. The

[Rails] Re: FactoryGirl - can't write unknown attribute, and undefined method `name'

2015-04-29 Thread Chris Lerum
in front of the table names and FK. But in yours there's none since it's a normal app. But is this the cause ? On Wednesday, April 29, 2015 at 6:53:18 PM UTC+3, Chris Lerum wrote: https://github.com/chrislerum/factory I tried whipping up an app with your code, the controller test passes fine

[Rails] Re: FactoryGirl - can't write unknown attribute, and undefined method `name'

2015-04-29 Thread Chris Lerum
is that in my case there's namespace in front of the table names and FK. But in yours there's none since it's a normal app. But is this the cause ? On Wednesday, April 29, 2015 at 6:53:18 PM UTC+3, Chris Lerum wrote: https://github.com/chrislerum/factory I tried whipping up an app with your