1
00:00:00,600 --> 00:00:10,290
Hello and welcome in this show we are going to create the action that will enable us to create a new

2
00:00:10,290 --> 00:00:17,190
post or actions are created in siby controller.

3
00:00:17,430 --> 00:00:26,290
So I'm going to expand our field here and expand that directory and click on control on the controller.

4
00:00:26,310 --> 00:00:28,140
Click on the pulse controller.

5
00:00:28,400 --> 00:00:36,470
So this is where will define all the methods or actions for our ports controller.

6
00:00:37,200 --> 00:00:42,070
We've already got one action in May which is index or just tab down.

7
00:00:42,180 --> 00:00:48,770
Let's create another one that will enable us to create or add a new post.

8
00:00:48,770 --> 00:00:57,600
So do we have to define it and give it a name we'll call it new and just type end and so that's basically

9
00:00:57,600 --> 00:00:57,950
it.

10
00:00:58,020 --> 00:01:05,190
We've added a new action called new that will enable us to add a new post.

11
00:01:05,220 --> 00:01:14,580
I'm just going to click File and say that the actions inside the controllers should have a corresponding

12
00:01:14,580 --> 00:01:15,310
view.

13
00:01:15,660 --> 00:01:20,770
So I'm going to create you for this action we've just created.

14
00:01:21,060 --> 00:01:22,860
So let's loop full.

15
00:01:22,890 --> 00:01:26,980
You direct three wishes here on The View.

16
00:01:27,030 --> 00:01:31,020
There should be a post.

17
00:01:31,290 --> 00:01:35,430
Let me the decrees that expanded again.

18
00:01:35,480 --> 00:01:42,600
And you can see the post here so this is where his site is very frequent posts his Where we to create

19
00:01:42,910 --> 00:01:44,320
a new view.

20
00:01:44,340 --> 00:01:49,650
So right click on the post and click new file.

21
00:01:49,650 --> 00:01:50,450
See.

22
00:01:50,520 --> 00:02:03,110
Has no see his saves to post view and there is already one view there so we can call it a new dot Hey

23
00:02:03,180 --> 00:02:11,490
t l DOT E R B E R B stands for embedded Ruby and have a quick C..

24
00:02:11,970 --> 00:02:19,250
So we've now created in new view you we're just going to add a tag to it.

25
00:02:19,740 --> 00:02:27,260
One tag is going to say hey one and say had.

26
00:02:34,730 --> 00:02:36,610
And I'll say that.

27
00:02:38,900 --> 00:02:39,470
Sabl.

28
00:02:39,480 --> 00:02:41,040
We've already got a rout for that.

29
00:02:41,040 --> 00:02:45,620
The rout was already being defined and when we did the resources.

30
00:02:45,900 --> 00:02:53,180
So now if I open up the page this is our application page.

31
00:02:53,460 --> 00:03:07,380
I should be able to navigate to the slas new Sorry slash post and then slash new.

32
00:03:08,460 --> 00:03:12,760
Okay so you can see we can communicate with the control.

33
00:03:12,960 --> 00:03:19,290
He can tell by the link we have because all the rules have already been defined.

34
00:03:19,350 --> 00:03:23,590
True when we added it added the post as a resource.

35
00:03:23,910 --> 00:03:28,290
So here hear this now we are now in a different rout.

36
00:03:28,380 --> 00:03:36,670
We knew the view correctly displayed is Few here which you've just created called New doty's email don't

37
00:03:36,750 --> 00:03:37,270
ya.

38
00:03:37,340 --> 00:03:38,870
So we can see this view.

39
00:03:38,870 --> 00:03:48,270
Here we are in our next lecture we are going to add a form to these few where people can read and post

40
00:03:48,570 --> 00:03:49,930
their new post.

41
00:03:49,960 --> 00:03:52,370
Okay that's the planful in next lecture.

42
00:03:52,590 --> 00:03:54,900
For now thanks for watching.

43
00:03:54,900 --> 00:03:56,250
Bye for now.
