
Ruby on Rails 5.1 - alifbae
http://edgeguides.rubyonrails.org/5_1_release_notes.html
======
eagsalazar2
Yarn and Webpack integration is already changing my life (for the better).
Documentation on both still sucks however. In particular the inclusion of yarn
and webpack represent a significant change in development workflows that
they've not really outlined yet.

~~~
eggie5
I haven't really been following yarn or web pack. Can you give an example of
how it changed your life?

~~~
rahilsondhi
Using npm alone is like using bundler without a Gemfile.lock. If one person
does `npm install` today, and a new teammate does `npm install` in a month,
the new teammate will _install different versions_. With yarn, there is a
yarn.lock to make sure everyone gets the same versions when they run `yarn
install`.

Also, yarn is way faster.

~~~
paulddraper
There is npm shrinkwrap, but the yarn folks will tell you yarn is better.

~~~
sergiotapia
There is ${some_random_lib} to solve this problem? Yawn! Use Yarn, it comes
baked in.

------
3pt14159
I'm still surprised they removed the formatting for db/schema.rb which I rely
on quite a bit to remind myself what properties models have, whether or not
their status can be set to null, and how many digits of precision my decimal
columns have.

I went as far as writing my own formatter which consumes the db/schema.rb
generated string and outputs another string with better formatting. The code
is kinda shaky because I wrote it in a rush, but if anyone is interested I can
share it with them.

~~~
poorman
You should check out the `annotate` gem.

~~~
6t6t6t6
Annotate is great! I cannot work in a Rails app without annotate.

------
brandoncordell
The new form_with is bugging me. It doesn't generate id's on inputs anymore,
so you have to manually add `id: 'field_id'` so that clicking labels focuses
on the input. Not having the id attribute has also broken Capybara's `fill_in
'Label text'` for me.

------
shawabawa3
jQuery no longer being a default dependency is great! been waiting for that
for a while

~~~
RubenSandwich
Poor jQuery. You truly made the web a better place, but we have moved on. My
feelings towards jQuery are almost exactly how I view my childhood dog. It was
good while it lasted, but I really had no idea what I was doing back then.

~~~
tomc1985
jQuery's still great if you don't want to use all these cheesy new-school JS
frameworks. I have yet to find it lacking

~~~
savanaly
The new school frameworks' purpose is pretty much entirely orthogonal to that
of jQuery's, although their features do overlap, which is I think why people
mistakenly say what you just said so often.

Angular, Ember, etc. are frameworks for coding routing, components, state,
etc. Barely any of this was the concern of jQuery, which the main purpose of
jQuery was to provide a lingua franca for interacting with browsers that were
inconsistent in their implementation of javascript.

------
MichaelBurge
It looks like "System Test" is what they call end-to-end testing using tools
like Selenium with a browser. Scripts that e.g. send POST requests to the
server process and check the result seem to also be included.

The new form_with looks convenient. It was always annoying occasionally having
to switch all the methods out when a form gets more complex.

I don't really use frontend Javascript stuff, but mostly because it was a pain
getting it to work with Rails and doesn't provide much benefit. Maybe in
another year the Webpack changes will have made it worth using.

------
nathan_f77
Wow, the yarn and webpack support is awesome! I've been using the
react_on_rails gem, and I didn't like how the webpack stuff felt "tacked on",
and I had to run a whole bunch of different stuff using guard. Hopefully they
can work with these changes and let me get back to a single "rails server"
command.

"System tests" look great, too. It's great that they've brought this in as a
convention, since every Rails project I've worked on has configured capybara
for integration tests.

------
pqdbr
I love Rails :)

------
swrobel
This was released on April 27. Old news.

~~~
petercooper
You're right, but curiously every post announcing Rails 5.1 at the time got
nowhere on HN:
[https://hn.algolia.com/?query=rails%205.1&sort=byPopularity&...](https://hn.algolia.com/?query=rails%205.1&sort=byPopularity&prefix&page=0&dateRange=pastMonth&type=story)

I think there's now too much going on and too few people reading /newest for
the HN front page to be a resaonably accurate representation of the big
stories if a key Rails release didn't even make it at the time :) Seen quite a
few similar instances as well. (The real issue IMHO is not enough exposure of
or encouragement to visit /newest, so it's pot luck if links get seen.)

~~~
tropshop
Or more people are just moving on from Rails. I used to religiously follow
every release. That ended shortly have the first few 3.x releases

~~~
petercooper
There is also that. But as a very keen purveyor of /newest (I basically have
every single thing come into a Slack channel) I am increasingly finding gems
or even significant news that would have once done well on the front page just
never reaching it. There is truly more cool stuff than we have room to show
:-) That is a great opportunity as well, though.

