ruby - displaying updated_at gives error in rails -
i´m trying display time when user updated post
<%= current_user.hwaters(:updated_at).to_s %>
user
has_many :hwaters
and hwaters
belongs_to :user
why not working?
if understood right want do, think try:
<%= current_user.hwaters.map(&:updated_at).join(', ') %>
by way, read more rails active record associations here understand how works.
Comments
Post a Comment