词汇:ours
pron. 我们的
相关场景
- This is just a little token to show our respect.>> 16. Slang in Tour Guiding
- We have to keep our fingers crossed.>> 16. Slang in Tour Guiding
- Both the driver and I will try our best to make your stay in Beijing happy and comfortable.>> 2. Metting the Group
- This is our driver Mr. Wang.>> 2. Metting the Group
- Your luggage will be delivered to the hotel by our luggage van.>> 2. Metting the Group
- One has just joined our group.>> 1. Making preparations 1-11
- When will our company give an annual party?>> 60-The Future
- 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.>> Rails 8.0.1 You are in good company
- 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.>> Rails 8.0.1 You are in good company
- SO now, we're created that user in production using our Kamal consol! I can log in with that user/pasword.>> Rails 8.0.1 You are in good company
- Because we had not run our DB seeds! Now, I could run DB seed in production, but let me show you another way doing it .>> Rails 8.0.1 You are in good company
- All right , let's save that and hop back,and see a reload here, now, we have a sign out button, and we can sign out, and that's all it should be. let's deploy this to production, we're gonna just check this thing into Git, deploy it straight to production, go back to our alpha.software...Oops! That didn't work. Why did that not work?>> Rails 8.0.1 You are in good company
- Now, if we hop back onto local host, and we try to log in with first the wrong password. we're actually gonna see something here , when I added the authentication, it added another gem, it added bcrypt, that's what we're using to keep password secure, so we have to hop back in here and restart our development server!>> Rails 8.0.1 You are in good company
- So that's just gonna be my email address and 123 password!We hop back into our CLI, and run rails db:seed, that's gonna run that file , I just showed you and set things up.>> Rails 8.0.1 You are in good company
- If we go back here and reload not in production, boom! We are live in production with our whole setup, everything is working, we can upload the active storage files directly to it.>> Rails 8.0.1 You are in good company
- And if we hop into our comment, we can set up a broadcast_to for that post. The broadcast_to will broadcast all update made to that comment, whether a new comment is updated or an existing comment is changed in some way or even one deleted, and send it back out to a channel on action cable named after the post association that this comment belongs to!>> Rails 8.0.1 You are in good company
- When it is nested, we get the fact that it's gonna be slash post slash on slash comments, and we have the association is set up nicely. Now, let's reload! Now it works, we have our comments field underneath. we can add the first comment. And as you can see here, this is my first comment a second ago that was the local time doing its time ago conversion.
当它被嵌套时,我们得到的事实是,它将是斜线后斜线对斜线注释,并且我们已经很好地建立了关联。现在,让我们重新加载!现在它工作了,我们在下面有我们的评论字段。我们可以添加第一条评论。正如你在这里看到的,这是我一秒钟前的第一条评论,当时当地时间正在进行时间转换。>> Rails 8.0.1 You are in good company- All right, let's save that and hop back into our browser. Oop! I made a mistake here! When we generated the resource,it added a route for the new comments,but that route was not nested by default. We actually need to go into our routes.rb, that resource we added needs to be nested.>> Rails 8.0.1 You are in good company
- 16:03:
- Now, we're also gonna add a number of partials here. This is the templating system, basically, a sub-routine that you can refer to. There's gonna be three of them that includes the entire comment section. We're gonna reference that in our post show in just a second. And within that, we're gonna refer to another partial for an individual comment, and another partial again for the new setup. So, let's paste some of that in here, You can see this for the entire collection, it just has an H2 for the comments, and we render the post comments. This again uses Rails' convention over the configuration approach.>> Rails 8.0.1 You are in good company
- Alright! Now let's add some comments to our blogging system! And I'm gonna use a different generator here,I'm gonna use a resource generator that is a little lighter than the one we were using for scaffold that doesn't generate a bunch of views, and doesn't generate all sorts of actions in the controller by default, but it does generate the new model that we need the comment model, it generates a migration for that, create comments ,and it generates just some empty placeholders for the comments controller and for the view action.>> 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
- But before we can do that, let's change the text area we had in the form here for our new post to be a rich text area. "form.rich_textarea :body". That's basically all you have to change, and let's save that and hop back into creating a new post.>> Rails 8.0.1 You are in good company
- If we then hop into our post model, we can declare that post model has rich text body. We're gonna convert the plain text body that we had just a second ago to a rich text body that is accessible through the WYSIWYG editor, and that accepts those active storage attachments and uploads.>> Rails 8.0.1 You are in good company
- Active Storage is a way to deal with attachments and other files in your Rails application. When you run it through action_text:install, it'll automatically set up those active storage tables that we need, there is one for blob,and then we have one for text here.We run migrations to set that up again, and now that we've run action_text:install, it also added a couple of gems, so we need to restart our development server. I do that just by exiting out and just running the server again!>> Rails 8.0.1 You are in good company