Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Jules Copeland's Profile

GitHub User: julescopeland

Comments by Jules Copeland

Avatar

I realise that you probably want to keep your examples simple and all in one file, but isn't creating categories or tags within the product model considered 'bad form'?

I'd love to see an episode with your take on the current OOP 'movement' in the Rails community - maybe a discussion on how and when you should use POROs etc.

You did some good episodes on design patterns like presenters etc. but a more general look at OOP would be great. Maybe even a multi-part series where you refactor a more complicated real world app?

Keep up the good work.

Avatar

Is there any way of making this work on Heroku without having to pay for their Redis instances?

Avatar

Hey Ryan, love your work.

Couple of questions - firstly, I'd like to reiterate gnagno's question of somehow doing a find_or_create_by kind of thing, so that you can add new items at the same time.

Second question - how do you make this work for multiple fields on the same form - e.g. Books might have many authors, categories, publishers (bad examples - but you get the point).

Also - for tidying up the json output, isn't it as easy as adding:

@authors = Author.where("name like ?", "%#{params[:q]}%").select(['name', 'id'])

at the end?

Thanks.