Do it every day – My first Rails app



Do it every day – My first Rails app

0 0


do-it-every-day-presentation

Presentation of the Rails Do it every day project http://www.do-it-every-day.com

On Github benoitvallon / do-it-every-day-presentation

Do it every day

My first Rails app

By Benoit (Summer2) / @benoitvallon

What is it?

Demo

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)

  • Many many packages
            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

Thank you

www.do-it-every-day.com Source code
Do it every day My first Rails app By Benoit (Summer2) / @benoitvallon