[eluser]SirSickboy[/eluser]
Howdy everyone
I'm currently building a cms using code igniter (who isn't? ;-) ) and have found myself evaluating a response from my model in the controller and setting flash vars accordingly. It strikes me that this is a bit daft as my model is in a better position to give an idea of what's happening.
For example i've got a save_page method in my cms model which calls on another method in that model _page_exists which returns true or false. If false the model tries to save the page and if all is ok the model returns true back to the controller. At no point does the controller know the outcome of _page_exists and can only evaluate what save_page has sent back to it. This is the point where i feel that the model should be setting the flash vars but i'm just wondering if i'm going about it the right way.
Any thoughts would be much appreciated.
Cheers