ActionView::Template::Error (undefined method `format_posted_time' for #<#Class:0x007ff1a676f6c0:0x007ff1a69035b8>):
3: .upper-message_user-name
4: = message.user.name
5: .upper-messagedate
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