ActionView::Template::Error (undefined method `format_posted_time' for #<#:0x007ff1a69035b8>):
3: .upper-message__user-name
4: = message.user.name
5: .upper-message__date
6: = format_posted_time(message.created_at)
7: .lower-meesage
8: - if message.content.present?
9: %p.lower-message__content
helper method `format_posted_time'が定義されていない。
6: = format_posted_time(message.created_at)
1.app/helpers/application_helper.rb
2.定義を記述
module ApplicationHelper
def format_posted_time(time)
time.to_s(:default)
end
end