class TagLog

Public Instance Methods

tags() click to toggle source

has_many :tags, foreign_key: 'user_id' TODO has_manyで指定

# File app/models/tag_log.rb, line 5
def tags
  Tag.where(user_id: user_id, date: date)
end
view_path() click to toggle source
# File app/models/tag_log.rb, line 9
def view_path
  "/user/#{user.name}/#{date.year}/#{date.month}/#{date.day}"
end