This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Create a new rails app called `gray_lady_app` outside of your kick_hash folder. | |
| __It should not be in a git repo.__ | |
| Add `rspec-rails`, `nokogiri`, and `httparty` to your gemfile and create a model called `Scraper` | |
| ===================================================== | |
| $ rails _3.2.14_ new gray_lady_app -d postgresql | |
| In Gemfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rails generate migration AddIqToZombie iq:integer | |
| You have to tell the ActiveRecord what they are doing Add | |
| You have to tell them to what column to add Iq | |
| You have to tell them to what table Zombie | |
| You have to tell them the type of material that it will be, in this case iq will be an integer | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Creating a rails rspec document | |
| $rails _3.2.14_ new zombie_rails -d postgresql | |
| create | |
| create README.rdoc | |
| create Rakefile | |
| create config.ru | |
| create .gitignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Create javascript file in folder with data you want to render. For example, I want a list of service providers so I ahve to go into views>service_providers and I will put my javascript index file in there: | |
| I will be rendering out of the index page so I am going to label my file | |
| index.js.erb | |
| 2. In my views>service_providers>>index.html.erb I have a partial with the list of service providers. I wrapped that content in a div with an id called "service-providers-list". This will allow me to pull that information into jquery | |
| <section class="main col col-lg-7"> | |
| <div id="service-providers-list"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Name | |
| mkdir config db helpers lib models public routes views | |
| mkdir db/migrate | |
| touch config.ru Gemfile main.rb Procfile README | |
| touch database.yml environments.rb unicorn.rb | |
| touch helpers/helper1.rb | |
| touch helpers/init.rb |
OlderNewer