mercredi 6 janvier 2016

Getting syntax error, unexpected '\n', expecting '=' in controller

I want to implement simple counter in Rails action, but it refuses to work for me.

enter image description here

  def show
    @article = Article.find(params[:id])
    @article.viewed += 1
  end

Aucun commentaire:

Enregistrer un commentaire