Rails Code Dreation 환경 개선

749 단어 Rails
  • rails new CodeReadingRuby on Rails clone
    |+CodeReading/
    |+rails/
  • # Gemfile
    source 'https://rubygems.org'
    
    gem 'rails', path: '../rails'
    gem 'pg'
    gem 'pry-rails'
    gem 'pry-doc'
    gem 'pry-byebug'
    gem 'byebug'
    
  • bundle install
  • rails g model User name:string
  • class User < ActiveRecord::Base
    
    binding.pry
      validates :name, length: { maximum: 30 }
    end
    
  • rails c 정교한user를 만듭니다.
  • 좋은 웹페이지 즐겨찾기