Created
March 13, 2017 07:59
-
-
Save WaKeMaTTa/f2aae297a4d02c8d459d7dd4ac058c35 to your computer and use it in GitHub Desktop.
New way to create models (Rails 5 way):
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/models/application_record.rb | |
class ApplicationRecord < ActiveRecord::Base | |
self.abstract_class = true | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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