Rails 8.0.1 You are in good company

杰瑞发布于2025-12-31

Over the past two decades, Rails has taken countless companies to millions of users and billions in market valuations.

  • hop vt. 跳跃;跳过
  • skeleton n. 骨架,骨骼;纲要;骨瘦如柴的人
  • scaffold n. 脚手架;绞刑台;鹰架
  • auxiliary n. 助动词;辅助者,辅助物;附属机构
  • digest vt. 消化;吸收;融会贯通
  • slot n. 狭槽;水沟;硬币投币口;位置
  • hub n. 中心;毂;木片
we are in with production authentication for the entire system. all right one last thing, let me show how to turn this web application into a PWA as well.
PWA:
Progressive Web Apps
渐进式Web应用程序
we're gonna create a link reference here to manifest just exists here as a comment that you can reference. We're gonna turn the manifest on in our route file as well.
We're gonna turn the manifest on in our route file as well. There are basically two lines here as you can see, there's a manifest, and there's a service worker that you can use for your PWA.
We'll turn those on and I'll show you the manifest first. The manifest is just really basic. It's gonna show the name of the PWA you're gonna using!
And it's gonna refer to an icon, by default,we just have a nice red dot.but you should obviously replace that with your application. And if I hop in and have a look at the service worker, it is sort of already set up for doing we push,just as an example here, having some listeners, you can tweak that as you see fit.
它将指向一个图标,默认情况下,我们只有一个漂亮的红点。但你显然应该用你的应用程序替换它。如果我跳进去看看服务工作者,它已经为我们推送做了准备,就像这里的一个例子,有一些监听器,你可以根据需要进行调整。
We're not gonna change that for this little example, but now let's check in that PWA files, and then let's deploy to production one more time. and as you can see, look in the top right corner, when I reload it, we now have that little install icon in Chrome. and if I click that little install icon, I'm gonna get this prompt, and boom! I have a PWA running in production for my Rails application.
So that is a very quick tour of Rails, this is a wonderful way of getting started,just to use those scaffold generators and the authentication generators to get something going, get a Hello world out there, start working on your application, and before you know it, you might just be taking your application all the way from Hello World to IPO.
这是Rails的快速浏览,这是一种很好的入门方式,只需使用这些脚手架生成器和身份验证生成器即可开始工作,创建一个Hello world,开始开发你的应用程序,不知不觉中,你可能会把你的应用程序从Hello world一直带到IPO。