daily pastebin goal
48%
SHARE
TWEET

Untitled

a guest May 16th, 2018 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class User < ApplicationRecord
  2.   has_many :blogs
  3.   validates_presence_of :name
  4. end
  5.  
  6. class Blog < ApplicationRecord
  7.   belongs_to :user
  8.   validates_presence_of :title
  9.   accepts_nested_attributes_for :user
  10. end
RAW Paste Data
Top