Tutorial | Codebase | Stylesheets
Gemfile
source 'https://rubygems.org'
# ruby-2.3.0
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
+ gem 'bootstrap-sass', '~> 3.3', '>= 3.3.7'
gem 'coffee-rails', '~> 4.2'
+ gem 'haml', '~> 4.0', '>= 4.0.7'
gem 'jbuilder', '~> 2.5'
gem 'jquery-rails'
gem 'pg', '~> 0.18'
gem 'puma', '~> 3.0'
gem 'rails', '~> 5.0.1'
gem 'sass-rails', '~> 5.0'
+ gem 'simple_form', '~> 3.4'
gem 'turbolinks', '~> 5'
gem 'uglifier', '>= 1.3.0'
group :development, :test do
gem 'byebug', platform: :mri
end
group :development do
gem 'web-console', '>= 3.3.0'
gem 'listen', '~> 3.0.5'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]app/controllers/pictures_controller.rb
class PicsController < ApplicationController
def index
end
endapp/views/pictures/index.html.haml
%h1 Index Pageconfig/routes.rb
Rails.application.routes.draw do
resources :pictures
root 'pictures#index'
endapp/controllers/pictures_controller.rb
class PicsController < ApplicationController
def index
end
def new
end
def create
end
end