7 ms·
Ruby on Rails 5.1
- shawabawa3 9y agojQuery no longer being a default dependency is great! been waiting for that for a while
- deleted 9y ago[deleted]
- RubenSandwich 9y agoPoor 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.
- eagsalazar2 9y agoI may not use it anymore, but I will never stop loving jQuery.
- jackhack 9y agoIf it's any consolation, your doggie didn't mind. That's what makes them such great companions. edit: r/care/mind
- tomc1985 9y agojQuery's still great if you don't want to use all these cheesy new-school JS frameworks. I have yet to find it lacking
- RubenSandwich 9y agoWell, I would argue that the main purpose of jQuery was to help cover all the strange DOM edge cases of the browsers of that time. In that case, it really isn't needed anymore as most browsers behave the same on like 90% of the things now. (It's just that people used it as if it was a Framework, not a library which caused a bunch of problems.) I am with you that if I'm doing something lightweight I don't use any of the new fancy JS frameworks, I just write vanilla JS.
- savanaly 9y agoThe 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.
- tomc1985 9y agojquery + vue.js on rails is pretty sweet and no npm dependency BS!
- eggie5 9y agostill miss prototype js...
- swrobel 9y agoThis was released on April 27. Old news.
- petercooper 9y agoYou'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&prefix&page=0&dateRange=pastMonth&type=story https://hn.algolia.com/?query=rails%205.1&sort=byPopularity&... 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 9y agoOr 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 9y agoThere 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.
- deleted 9y ago[deleted]
- pqdbr 9y agoI love Rails :)
- MichaelBurge 9y agoIt 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.
- eagsalazar2 9y agoYarn 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 9y agoI haven't really been following yarn or web pack. Can you give an example of how it changed your life?
- rahilsondhi 9y agoUsing 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 9y agoThere is npm shrinkwrap, but the yarn folks will tell you yarn is better.
- sergiotapia 9y agoThere is ${some_random_lib} to solve this problem? Yawn! Use Yarn, it comes baked in.
- eggie5 9y agoThanks for the analogy. I am now update-to-date w/ 3 years of JS churn :)
- 3pt14159 9y agoI'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.
- superplussed 9y agoWhat formatting did they remove, the indentation?
- poorman 9y agoYou should check out the `annotate` gem.
- 6t6t6t6 9y agoAnnotate is great! I cannot work in a Rails app without annotate.
- dorianm 9y agoI'm interested, I would use `rubocop -a` personally.
- ezekg 9y agoAs 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 https://github.com/rails/rails/pull/25675
- 3pt14159 9y agoImagine 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.
- nathan_f77 9y agoWow, 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.
- brandoncordell 9y agoThe 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.