- redirect_to(action="show", id=art.id)
\ No newline at end of file
+ redirect_to(action="show", id=art.id)
+
+ def rate(self, id):
+ art = Art.get(id)
+ art.rate(request.params["score"], c.user)
+ elixir.session.commit()
+ redirect_to(action="show", id=art.id)