Live data from Hacker News

Ruby on Rails 5.1

edgeguides.rubyonrails.org

11–20 of 35 posts

Re: Ruby on Rails 5.1

#11

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

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.

I may not use it anymore, but I will never stop loving jQuery.

Re: Ruby on Rails 5.1

#12
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.

Re: Ruby on Rails 5.1

#13
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.

Re: Ruby on Rails 5.1

#14

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…

What formatting did they remove, the indentation?

Re: Ruby on Rails 5.1

#15

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…

You should check out the `annotate` gem.

Re: Ruby on Rails 5.1

#16

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…

I'm interested, I would use `rubocop -a` personally.

Re: Ruby on Rails 5.1

#17

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…

As far as I can tell, they only modified the formatting used for lining up column options[0], not all formatting for the file. I hated that formatting anyways, due to the diffs it produced. I admit that I haven't tested a migration on 5.1 yet and am just looking at the commit log so maybe I'm wrong.

[0]: https://github.com/rails/rails/pull/25675

Re: Ruby on Rails 5.1

#18
post #17

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…

As far as I can tell, they only modified the formatting used for lining up column options[0], not all formatting for the file. I hated that formatting anyways, due to the diffs it produced. I admit that I haven't tested a migration on 5.1 yet and am just looking at the commit log so maybe I'm wrong. [0]: https://github.com/rails/rails/pull/25675

Imagine wanting to quickly scan which attributes are required and which ones aren't. It used to be easy, find the "null" option with your eyes then scan downwards. Plus it just looks more messy now.

Re: Ruby on Rails 5.1

#19
post #17

Earlier quoted context omitted.

As far as I can tell, they only modified the formatting used for lining up column options[0], not all formatting for the file. I hated that formatting anyways, due to the diffs it produced. I admit that I haven't tested a migration on 5.1 yet and am just looking at the commit log so maybe I'm wrong. [0]: https://github.com/rails/rails/pull/25675

Imagine wanting to quickly scan which attributes are required and which ones aren't. It used to be easy, find the "null" option with your eyes then scan downwards. Plus it just looks more messy now.

Sure, but I still wasn't a fan of the diffs that it produced—and like poorman said, if you really need that then use the annotate gem which lets you check the model file for that info instead of digging through a giant schema file.

Re: Ruby on Rails 5.1

#20

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.

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