词汇:at
prep. 在(表示存在或出现的地点、场所、位置、空间);向;朝;因为;忙于;以(某种价格、速度等)
相关场景
- 4:
- When will the flight arrive? E.T.A of the flight is eight fifteen. The flight is going to arrive at 12:30 pm. The airplane will land at the Capital International Airport around midnight.>> Making preparations 1-11
- Meet a guest at the lobby of the airport.>> Meeting the Guests at the Airport
- 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.
它将指向一个图标,默认情况下,我们只有一个漂亮的红点。但你显然应该用你的应用程序替换它。如果我跳进去看看服务工作者,它已经为我们推送做了准备,就像这里的一个例子,有一些监听器,你可以根据需要进行调整。>> Rails 8.0.1 You are in good company- And then, we are going to hop in here and have a look at what was actually generated. We have the sessions controller, that's probably the most important. You can see here, it allows unauthenticated access to just new and create.>> Rails 8.0.1 You are in good company
- Glancing at her scornfully.>> 57-Can I Help You, Madam?
- I've directed them to keep looking at the individual who rented the truck to explode, that exploded in Las Vegas, also served as active duty U.S. Army.
我已经指示他们继续关注租用卡车爆炸的人,那辆卡车在拉斯维加斯爆炸,也曾是美国现役陆军。>> 56-Faster Than Sound!- Confidence at the heart of confidence is action.
信心的核心是行动。>> Confidence is action- 21:28:
- So this server exists on this address, servers web: - demo.exitsoftware.io ; proxy: host: alpha.exitsoftware.io; And I will then fill out the host as a C name to that machine. But we're using Alpha here, if I had deployed another application called Bravo to the same server, Kamal would set it up, so it's like I host two applications or any number of applications on that same server! Now, we will also need to have a look at the secrets here, that is in dockyml/secrets, because the register that I'm using, that is Docker Hub, needs of course a password, it is using my username but also needs a password.>> Rails 8.0.1 You are in good company
- And that is basically it. Now if I go over here and I add a comment to one of these, you see the comment was added on the left immediately at the same time. That's all web sockets automatically happening through action cable. And we can do it , of course the other way as well.>> Rails 8.0.1 You are in good company
- And then, Rails by default also adds two timestamps that it keeps track of by itself, created at and updated at. And below that, you had the post that we added originally.>> Rails 8.0.1 You are in good company
- If you look at something like hey.com, you'll see this technique in use on a major application, and you can view all of the Javascript that we use to build that application, and that's the default for Rails.>> Rails 8.0.1 You are in good company
- But we can also have a look at a specific file, you'll see it matches exactly what we have back there. That's not a development setup! That is what we're shipping in production. There is no minification, there's no transpilation, there's none of that nonsense because you just don't need it.>> Rails 8.0.1 You are in good company
- sent the children to school. dropped off the children at school.>> 54-Sticky Fingers
- inspector:
- But really, what's unique here for Rails is the fact that we're using no build by default! So if I go over here in the inspector and look at the JavaScript files that are included,you can see we have the application js file with a little digest stamp on there. If we change anything that application js file, the digest is going to change, and the browser will redownload just the part!>> Rails 8.0.1 You are in good company
- zoo:
- And we will give it a format for what it should do with UTC timestamp, and turning it into a local time that we can have a look at.So if I reload here, you see it is November 13th, by the time of my recording at 3:28 PM in my local time zone, but actually underneath, the time tag is gonna be in UTC. That means we can cache this, and anyone around the world will still get the time displayed in their local time.>> Rails 8.0.1 You are in good company
- And we're gonna start local time here. And in the local time, we're gonna use it, and we're gonna use it for adding the updated at timestamp here. And as you can see here, we're just adding a time tag that's just a vanilla HTML tag that has a data local time that's what activates that local time JavaScript set up.>> Rails 8.0.1 You are in good company
- But now that we've add that, let's have a look at our application JS file.That's the default setup that you have that the scaffold is going to use. And as you can see, we're using turbo-rails, we're including all the stimulus controllers, if we have any.>> Rails 8.0.1 You are in good company
- So, we can do that using the import map pin command. And as you see, now that I hop back into our config import map, we've added the local text pin at the bottom, version 3.0.2. It pulled that straight off NPN, it downloaded that as a vendor dependency that we can check into our version control system. And now, we don't have any runtime dependency whatsoever on NPN, or anything else like that.>> Rails 8.0.1 You are in good company
- And then, there's the stimulus framework for creating that additional functionality that you might need in a really simple way. You can have a look at hotwire.dev to see more about that, but what we're gonna add here is a little piece of JavaScript to just add some additional functionality, pulling something in from pin.>> Rails 8.0.1 You are in good company
- Now, let's add a bit of custom JavaScript. Rails by default ships with Hotwire! Hotwire gives you Turbo, which is a way of accelerating page changes and updates is that your application will feel as fast and as smooth as a single page application without you basically having to write any JavaScript at all.>> Rails 8.0.1 You are in good company
- As you can see here, there is now a full WYSIWYG interface for creating the body. It comes with a default set of styles for the toolbar, you can change those, those styles are generated straight into your application, so you can make it look nice for yourself. Let's give some bold and italic text here, you see, that was all that was needed. but I think what's even nicer to look at here is if we do an upload and we add a file, you will see that file gets added with a preview directly to the WYSIWYG editor. And if we save that and we update the post, it is added to the post itself. And that then went through the whole process of doing a direct upload of the file when we dropped it into the editor, that uploads it straight to active storage. And then, we have access to that, and rendering it directly from whatever storage backend active storage is using. In this example , we're just storing on disk, but you could be storing your active storage in S3 or another object storage.>> Rails 8.0.1 You are in good company
- And you can help diagnose whatever issue that it is that you have ! But let's remove that again and then let's look at the console from another angle. Now, you can get the console as I just showed you when an exception raised, but you can also get the console if you just run rails console.>> Rails 8.0.1 You are in good company
- console instance variables:
- Now, let me show you one of the first feature here. If we do raise exception inside the index action, "rails 'some exception' " you will see that Rails provides some really nice interface for dealing with that exception, seeing exactly where it happened. If I'm reloading here, you can see the line, it was raised on the source code that's around it, you can see a full trace. And down here, we even have a console! So, you can interact with the instance variables that have been set for this index actions, here's just at posts that's been made available.>> Rails 8.0.1 You are in good company
- This is the thing you're gonna see, when you start up a new Rails application, it'll tell you which version you're on, both for the ruby version, the Rails version, and the Rack version. That's running on localhost:3000 by default. But if we do slash posts here, you'll see the scaffold interface that we generated. Now, this is the index action, the one we just looked at in the view and from the controller. But if we click the New, you see here we have form for creating the new post with its title and its body. it's quiet basic, to put it mildly right now, but all the actions are mapped out. This scaffold interface is not meant for shipping into production, it is meant to showing you how to build a Rails application with the basics, and then you make it look pretty, you make it look nice.>> Rails 8.0.1 You are in good company
- And then finally, we have the views that are being generated. If we hop in here and have a look at the index view, you can see this is where we will list all the posts that are in the system.>> Rails 8.0.1 You are in good company