Skip to content

Instantly share code, notes, and snippets.

@WaKeMaTTa
Created March 13, 2017 07:59
Show Gist options
  • Select an option

  • Save WaKeMaTTa/f2aae297a4d02c8d459d7dd4ac058c35 to your computer and use it in GitHub Desktop.

Select an option

Save WaKeMaTTa/f2aae297a4d02c8d459d7dd4ac058c35 to your computer and use it in GitHub Desktop.
New way to create models (Rails 5 way):
# app/models/application_record.rb
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
# app/models/user.rb
class User < ApplicationRecord
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment