On Friday 09 October 2009 08:33:28 Josef Reidinger wrote:
def create + puts "-> REGISTRATION CREATE"
^^^^ Hi, please don't add debugging output as puts. It is not rails way,
[...]
+ puts @reg.inspect + return @reg.inspect
Returning inspect, which should change in next rails version is not good idea.
This stuff is only development-debugging output, as the registration does not work correctly yet. I just want to understand why and until where I get and what the data is. None of the return *.inspect will remain, its just for a quick look inside. Thats why the code is in a branch. To master I will only commit cleaned up code.
At overall I think that you overload controller layer. It should be thin layer which connect model with view. I think that many your methods should go to model. Controller should contain only model initialization and model changing. Rest model manipulation should go to model. Look e.g. at time module or language, how thin should be controller layer.
After removing all puts the controller is very thin. The only thing thats will
be done there is parsing the post/put-data and adding it the the registration
object (see the TODO mark).
But thanks for your hints, I will take them into account.
Ciao,
Daniel
--
J. Daniel Schmidt