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

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -