Live data from Hacker News

Ask HN: What do you want to see in Rails 4.1?

news.ycombinator.com

81–90 of 94 posts

Re: Ask HN: What do you want to see in Rails 4.1?

#81

I'm still new to rails but I would really like to see: - Something like spring ( https://github.com/jonleighton/spring ) built in because I use a low end machine and it still takes 5-6 seconds just to see a page refresh with live reloading enabled in my browser with nearly an empty project in terms of complexity. It would be nice to have it somehow work for tests and near instant code reloads for development. Random…

Spring was made by a core member, there is also rails/commands. You might see this feature or not... Queues will be an interface for things like Resque to implement, not an implementation itself. I maintain Resque too, it'll be a good story to use the two together.

Nice, sounds good.

I vaguely remember reading about a downside when using the console to run tests, maybe I should give it a second look.

All I care about is being able to run tests on file save from my editor and seeing feedback in a terminal window. Speedier the better of course.

Re: Ask HN: What do you want to see in Rails 4.1?

#83

Replace turbolinks with pjax.

Considering dhh created Turbolinks specifically to improve upon PJAX, I think we both know how likely that idea is. Thanks for the suggestion though!

How about something like pjaxr?

https://github.com/minddust/jquery-pjaxr

Re: Ask HN: What do you want to see in Rails 4.1?

#84
I would love to see something like Django's Editing Views. Ever since George Brocklehurst described this at Ruby Manor earlier this year I can't get the idea out of my head. If you look at all the security issues and hand wringing over params parsing, roles, attr_accessible and strong attributes, etc, etc, a very large percentage of those issues are greatly improved or in some cases completely nullified by Django's approach to forms. It's actually one of the biggest Rails warts in my opinion.

In essence, the idea there should be an object that knows how to render a form based on an internal object state paired with a deserializer that knows how to read the form in and convert it to an internal object state. This way, by default, the form only recognizes the params that were defined and the risk of leaky params causing security issues is reduced by orders of magnitude.

I'm not sure how you retrofit something like this into Rails since it would be a huge architectural shift, but man it would be sweet to see something official along those lines.

Re: Ask HN: What do you want to see in Rails 4.1?

#85

I would love to see something like Django's Editing Views. Ever since George Brocklehurst described this at Ruby Manor earlier this year I can't get the idea out of my head. If you look at all the security issues and hand wringing over params parsing, roles, attr_accessible and strong attributes, etc, etc, a very large percentage of those issues are greatly improved or in some cases completely nullified by Django's a…

There are a few gems that do this, but you're right, it'd be a huge shift. I do like the approach, though I haven't tried it outside of toy examples myself.

With features like this, the usual answer is 'if a gem gets popular enough, we'll consider it.'

Re: Ask HN: What do you want to see in Rails 4.1?

#86

Thanks for putting this together Steve. Your work, and those of the Rails contributors is amazing stuff. I know this past year has been a pain from a security perspective but as a framework matures and adds n+ features, it is an inevitable outcome. For me, my wish list would be: - Down with helpers. Or, at least the ability to arbitrarily set them. Maybe push presenter as alternatives? - Some native performance tunin…

Thanks!

I'm sure you know that I'm a big fan of presenters, maintaining one of the most popular gems that implements them, but they've generally been deemed a bit too heavy of a pattern in the past. What do you mean by 'arbitrarily set them'?

There were performance tests, but nobody used them, so we pulled them out to a gem in 4.0.

Can you give me an example of the eval problem? Not familliar with it.

Re: Ask HN: What do you want to see in Rails 4.1?

#87

1) Support minitest/spec with ActiveSupport::TestCase 2) Make rails indenpendent of testing framework, why should I case about minitst if I prefer rspec?

1) was specifically reverted by David, so that won't be happening.

2) How is it not agnostic now? What's the problem with just using rspec?

Re: Ask HN: What do you want to see in Rails 4.1?

#88

Hey Steve, great of you to ask! Here are some suggestions: * Streamline the command line. Why rake to migrate, but rails to generate a migration? I know, I know. But new folks to Rails do not know. And it would be better if there was just one tool that does it all. * Get rid of the global magic functions. users_path is nice and sweet, but where is it defined? Object? Kernel? Why can't I just call a method on my app.…

As a newbie on Rails (I'm designer, don't kill me) i have to agree with point 1. After some couple of days practicing migrations and generators, it doesn't become a problem.

Re: Ask HN: What do you want to see in Rails 4.1?

#90

I would love to see rails-api become a first-class player in the Rails ecosystem.

Given that I help maintain it, you can imagine that I'm a bit biased here. ;) That said, other than increased usage, I don't think being included in core would actually do anything that we can't already do ourselves outside of core.

IMHO, built-in support of api-only application is very good. Here are the reasons I can think of right now:

1. unify people who are looking for a standard approach to create api in Rails

2. clear separation between lower level http support and higher level html/js/css processing

3. performance improvement against using regular Rails for api

4. easier upgrade for app developers

Post reply on HN