-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I agree with Bryan about moving external logic to a class in /lib,
/services or something similar. You can also tune the transitions in
your controller if you wish:
def do_mark_as_read
notice = Notice.find(params[:id])
if notice.ready?
do_transition_action :mark_as_read
else
flash[:error] = "Please do something first"
redirect_to(:action => 'show')
end
end
Regards,
Ignacio
El 18/09/12 22:40, brettnem escribi�:
- --
Ignacio Huerta Arteche
http://www.ihuerta.net
Tel�fono: 0034 645 70 77 35
Email realizado con software libre
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla -
http://www.enigmail.net/
iEYEARECAAYFAlBbGhEACgkQBPlUJ6RHaOSMoQCgpLQbZ9PduUlHcw9Pzj9yT+Yg
5IMAniqNJWVj3lFhyUXXiM/VT6ZNecJJ
=2jET
-----END PGP SIGNATURE-----