Live data from Hacker News

Rails 6.1

weblog.rubyonrails.org

31–40 of 87 posts

Re: Rails 6.1

#31

I did a bunch of work in rails prior to the 3.0 days ( probably around 2013 or so), but then switched domains to work more in data engineering. When I came back to it to scratch an itch for some pet projects, I barely recognized it. I felt completely lost. Life moved pretty fast, I guess. Are there any good resources out there for someone from the 2.x days to get back to speed?

For what it’s worth, the 2->3 update was by far the most consequential; they merged in Merb, rewrote how routes and controllers worked, and completely flipped expectations on how JS and views should work.

Rails 3->6 has had far fewer major user-facing architectural changes, and consisted mostly of new tools and APIs. A lot of stuff they added used to be handled by gems - password hashing, attachments, background jobs, caching, etc. all got rolled into the core framework.

Another comment mentioned https://guides.rubyonrails.org, which is good. I would focus on the new routing style, REST controllers, forms, and strong params; once you wrap your head around those, the rest will probably fall into place, or could be ignored completely.

Re: Rails 6.1

#32

I did a bunch of work in rails prior to the 3.0 days ( probably around 2013 or so), but then switched domains to work more in data engineering. When I came back to it to scratch an itch for some pet projects, I barely recognized it. I felt completely lost. Life moved pretty fast, I guess. Are there any good resources out there for someone from the 2.x days to get back to speed?

I fall in this same bucket. I still refer to the old railscasts now and then. I use rails for my hobby projects. Currently, I depend on Rails Guides, and I think they do a pretty good job. Would be good to know other resources. https://guides.rubyonrails.org/

Railscasts sadly is no longer but now the two big ones that operate in that space are GoRails and Drifting Ruby. Some other non-screencast resources I like however are Boring Rails and Playbook Thirty Nine (ebook of tips and tricks from the trenches of a real life smalltime Rails SaaS business)

Re: Rails 6.1

#33
post #9

"rafaelfranca released this 1 hour ago · 324 commits to master since this release" That's the sign of a very actively maintained project! (To clarify: those 324 commits didn't all happen in the past 60 minutes, but it does show that there's a huge amount of development activity going on around Rails core)

Yeah, I think this is indicative of a feature lock during the RC period, and once the release is cut that opened up a bunch of PRs that were just waiting in the wings.

Re: Rails 6.1

#34
post #27
post #4

Lots of good stuff in here, including much more support for using UUIDs as PKs. My favorite new feature is "delegated type" in ActiveRecord to offer a new way to map class hierarchies onto database tables. I wrote a blog post about it[0], but the actual PR is very readable as well[1]. [0] https://www.stevenbuccini.com/how-to-use-delegate-types-in-r... [1] https://github.com/rails/rails/pull/39341

> Lots of good stuff in here, including much more support for using UUIDs as PKs. I missed this. Going through the changelogs the only thing I found is support case-insensitivity for pg UUID types. Is that what you meant? I really think that not supporting UUID PKs is one of biggest issues with Rails. You can go around it and maybe even use a gem for it, but that's still a bit risky.

I use UUID PKs in Rails today. What support do you think it is missing?

Re: Rails 6.1

#35
post #16

Earlier quoted context omitted.

Depending on your patience you can go and take a look at a real life implementation of it at https://app.hey.com since they enable source maps. What the actual developer facing API is going to look like however is another question. I do kind of worry that given how much is has been talked up by DHH in particular that it is going to struggle to live up to the hype. Either way, I am excited to see something new in the…

I was sold on hey.com's UI design already because it's using for dropdown menus. The really fun part, though: the summary content isn't just a menu icon, it's a trigger for some (currently unpublished) Turbolinks variant. The menu content is loaded (and subsequently 304'd) dynamically as a server-rendered partial (sans layout). Most tellingly, if you visit the menu content's XHR URL with regular browsing then hey.com…

> Especially so since I have a mission to replace all my dropdown & modal boilerplate with and elements, and I like to build services that still work if JS is disabled.

Can you elaborate on why `` is specifically exciting to you?

Re: Rails 6.1

#36
post #27
post #4

Lots of good stuff in here, including much more support for using UUIDs as PKs. My favorite new feature is "delegated type" in ActiveRecord to offer a new way to map class hierarchies onto database tables. I wrote a blog post about it[0], but the actual PR is very readable as well[1]. [0] https://www.stevenbuccini.com/how-to-use-delegate-types-in-r... [1] https://github.com/rails/rails/pull/39341

> Lots of good stuff in here, including much more support for using UUIDs as PKs. I missed this. Going through the changelogs the only thing I found is support case-insensitivity for pg UUID types. Is that what you meant? I really think that not supporting UUID PKs is one of biggest issues with Rails. You can go around it and maybe even use a gem for it, but that's still a bit risky.

I encountered several bugs, especially around generators and ActiveStorage, where code paths weren't respecting UUID primary keys.

Re: Rails 6.1

#37

Earlier quoted context omitted.

I'm out of the loop. what is New Magic?

DHH mentioned "NEW MAGIC" when he released the Hey stack on twitter [1]: > The HEY stack: - Vanilla Ruby on Rails on the backend, running on edge - Stimulus, Turbolinks, Trix + NEW MAGIC on the front end There has been a lot of speculation since then on what New Magic is. It was supposed to release at the same time as hey.com but they decided to postpone it till later. Many people think/hope that it is something simi…

I asked DHH the other day about the server side aspects of NEW MAGIC and he replied with: https://twitter.com/nickjanetakis/status/1334940603457658883

So we know NEW MAGIC will involve a substantial amount of integration with Rails on the server side but it could technically be ported over to other frameworks.

It's interesting because StimulusJS 2.0 and Turbolinks 6 are fully client side based on previous tweets by members of Basecamp. I wonder if NEW MAGIC will be focused on broadcasting real-time updates to the front-end while partial page updates that would normally be server rendered templates could be handled by Turbolinks 6 alone. That would be great news for anyone wanting to create amazing feeling apps with any back-end stack, without going the SPA route.

Re: Rails 6.1

#38

I did a bunch of work in rails prior to the 3.0 days ( probably around 2013 or so), but then switched domains to work more in data engineering. When I came back to it to scratch an itch for some pet projects, I barely recognized it. I felt completely lost. Life moved pretty fast, I guess. Are there any good resources out there for someone from the 2.x days to get back to speed?

Subscribe to GoRails for brilliant screencasts (many free, some not). Also look at the official guides. It’ll probably still really familiar tbh!

Re: Rails 6.1

#39
post #6

It's a really nice time to be a Ruby / Rails developer. Rails itself has made some really nice improvements with this release and there is also the "NEW MAGIC" should be following in the next couple of days which is currently being sold as what Rails was to the back end, this will be to the front end. Ruby 3 is also just a few days away which brings optional type checking to helps add some additional structure to lar…

>Ruby 3 Oh shit, I didn't realize that that's the scheduled Christmas release. Finally, all strings frozen by default!

Ruby 3.0 will not have frozen strings by default:

https://bugs.ruby-lang.org/issues/11473#note-53

Re: Rails 6.1

#40
post #10

>Error Objects Active Model’s errors are now objects with an interface that allows your application to more easily handle and interact with errors thrown by models. The feature was implemented by lulalala and includes a query interface, enables more precise testing, and access to error details. This has been in the work since Rails 5.x and I believe Lulalala extracted it from his work on Gitlab. And it was lot of har…

I'm out of the loop. what is New Magic?

Probably something similar to Stimulus Reflex/LiveView
Post reply on HN