> Se entiende mejor.
>
> Y no, lo que haces es agregar lógica en tus modelos. En lugar de
>
> current_user.operations.create(:name => "Blah", :points => 100)
> current_user.reload
>
> Tendrías algo como
>
> current_user.add_operation("Blah", 100)
>
> class User
> def add_operation(name, points)
> operations.create(:name => "Blah", :points => points)
> self.points += points
> self
> end
> end
Esta me gusta mas :), voy a ir por este lado.
Gracias ^_^
--
--
Ricardo Markiewicz
http://www.gazer.com.ar/
http://www.voyovoy.com/ - ¿Qué hay para hacer?
_______________________________________________
Ruby mailing list
[email protected]
http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar