Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 888 Bytes

README.md

File metadata and controls

36 lines (28 loc) · 888 Bytes

Cheat Sheet

  1. docker-compose run --rm --service-port web bash
  2. rails db:create
  3. docker-compose run web bundle show
  4. docker-compose run web bundle install --without production
  5. app/controllers/application_controller.rb
protect_from_forgery with: :exception

    def hello     
       render html: "hello, world!"   
    end
  1. config/routes.rb
root 'application#hello'
  1. docker-compose run web rails generate controller StaticPages home help
  2. docker-compose run web rails destroy controller StaticPages home help
  3. docker-compose run web rails test
test "should get about" do     
    get static_pages_about_url     
    assert_response :success   
  end 
  1. app/views/static_pages/home.html.erb, app/views/static_pages/help.html.erb
  2. config/routes.rb
  3. touch app/views/static_pages/about.html.erb