Add Day 6 - Hands-On: Building a weak app
This commit is contained in:
parent
f6ee8ceebd
commit
68d1c262b9
@ -76,7 +76,8 @@ end
|
|||||||
```
|
```
|
||||||
If navigate to this folder, you can use `vagrant up` to spin up your centos7 machine in your environment.
|
If navigate to this folder, you can use `vagrant up` to spin up your centos7 machine in your environment.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
Then we will need to access our machine, you can do this with `vagrant ssh`
|
Then we will need to access our machine, you can do this with `vagrant ssh`
|
||||||
|
|
||||||
@ -151,11 +152,11 @@ bundle exec rake db:migrate
|
|||||||
|
|
||||||
We can then run our app with `bundle exec rails server -b 0.0.0.0`
|
We can then run our app with `bundle exec rails server -b 0.0.0.0`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Then open a browser to hit that box, I had to change my VirtualBox VM networking to bridged vs NAT so that I would be able to navigate to it vs using vagrant ssh.
|
Then open a browser to hit that box, I had to change my VirtualBox VM networking to bridged vs NAT so that I would be able to navigate to it vs using vagrant ssh.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Now we need to **scaffold** a basic model
|
Now we need to **scaffold** a basic model
|
||||||
|
|
||||||
@ -168,13 +169,13 @@ bundle exec rails generate scaffold Bootcamp name:string description:text dates:
|
|||||||
bundle exec rake db:migrate
|
bundle exec rake db:migrate
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Add a default route to config/routes.rb
|
Add a default route to config/routes.rb
|
||||||
|
|
||||||
`root bootcamps#index`
|
`root bootcamps#index`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Now edit app/views/bootcamps/show.html.erb and make the description field a raw field. Add the below.
|
Now edit app/views/bootcamps/show.html.erb and make the description field a raw field. Add the below.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user