Models
create new file
app/models/article.rb
class Article < ActiveRecord::Base
end
Getters and setters are generated automatically by defining empty class
Adding validations
class Article < ActiveRecord::Base
validates :title, presence: true, length: { minimum: 3, maximum: 50 }
end