for loop - Why is it impossible to read database table value -


i show value of visit number of article

so using scaffold gem, , making new value t.integer=views in database table

why doesn't work??

def show @post = post.find(params[:id]) @post.views=+1 @post.save 

end

the error goes undefined method `views=' #


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -