Sha256: d77bb49caac5ea5939cace0d8ac460af7d7e444c27b69063bff13981cdd92654
Contents?: true
Size: 280 Bytes
Versions: 12
Compression:
Stored size: 280 Bytes
Contents
class Post < ApplicationRecord # belongs_to :author, class_name: 'User', foreign_key: :user_id belongs_to :user belongs_to :category # tutorial: https://youtu.be/WgNK-oINFww?t=209 def excerpt ActionView::Base.full_sanitizer.sanitize(content).truncate(50) end end
Version data entries
12 entries across 12 versions & 1 rubygems