News for hackers. Stuff that matters.
Re:Offer HN: Help with Ruby on Rails by Robin_Message on Wednesday October 27, 2010 @12:36PM (#1839327)
Thanks, this was helpful, especially fields_for.

On the point of building my own, that's what I've done, but these felt like an obvious things to want (I implemented them both in my own PHP framework.) Thinking about it, the standard Rails CRUD index provides delete links instead of buttons; IMHO that is totally wrong, but when all you have is a hammer... Also, button_to is not good enough as it makes its own form, which breaks any solution to question 2.

On question 1, what I want is to generate submit buttons like <input type=submit name=some_non_clashing_string_that_identifies_this_button value=ButtonText> and then have this routed to a function nicely. I've not found a standard way of doing that; maybe I should write one? Could you see it being useful?

Re:Offer HN: Help with Ruby on Rails by epochwolf on Wednesday October 27, 2010 @01:18PM (#1839527)
It definitely sounds like you are doing something wrong. Rails really wants you to do things it's way. You don't have to, rails, especially version 3, is only generated html and routes to functions. It just generates a lot of stuff for you. If you want to work outside of the provided functionality it's just going to be harder.

In fact the application I'm using at work right now uses ExtJS for views and half of the data is retrieved through manual queries. Rails is not designed to do this but it can work, if you are willing to put in the effort to work around missing functionality.

I do not recommend using rails as a hammer, it's a very bad hammer. It's a chainsaw with diamond teeth and a 50 hp gas-powered engine. If you have a lot of wood to chop through, it's amazing. If you need to pound in a few nails, it's a little awkward. :)

Re:Offer HN: Help with Ruby on Rails by xentronium on Wednesday October 27, 2010 @03:05PM (#1839998)
Yep, for something simple just use Sinatra / other microframeworks.