Do it every day
My first Rails app
By Benoit (Summer2) /
@benoitvallon
My first rails project and my first lines of ruby
What was cool in Rails
- The command line tools
- The design of the models
- The Asset pipeline
- The existing gem
The command line tools (yeoman generator)
rails new myProject // create a new project
rails server // launch a web server on localhost
rails controller myController // create a the files and project struture for your controller
The design of the models
- API resource oriented
- The validator on the models
class Goal < ActiveRecord::Base
belongs_to :user
validates :user_id, presence: true
validates :title, presence: true, length: { maximum: 140 }
validates :start_date, presence: true
has_many :activities, dependent: :destroy
end
Asset pipeline (grunt/gulp)
- Easy to intergate sass
- Ready to work out of the box
The existing gem (npm)
gem 'devise', '~> 3.5.1'
gem 'momentjs-rails'
gem 'bootstrap3-datetimepicker-rails'
gem 'font-awesome-sass'
Conclusion
- Everything is integrated
- Ruby have a nice syntax
- Rails have a nice features
- Makes me use reveals.js
Do it every day
My first Rails app
By Benoit (Summer2) /
@benoitvallon