Log message #1110732

# At Username Text
# Oct 22nd 2009, 16:29 brookshire not all validation belongs in the model
# Oct 22nd 2009, 16:29 Ceeram you can call validates() from model, or controller or even component but the validation still is in the model
# Oct 22nd 2009, 16:29 Ceeram brookshire: form a company calling validates()? validates() still is a model method
# Oct 22nd 2009, 16:28 sphereweb btw i luv CakePHP :)
# Oct 22nd 2009, 16:28 arz sorry for that question , but does this code look like pure model, or just a set of functions that return output?
# Oct 22nd 2009, 16:28 sphereweb what could be the problem and how would i attempt to debug it? :)
# Oct 22nd 2009, 16:27 sphereweb I have a contact view (/views/pages/contact.ctp) where i have an ajax form that is created by $ajax->form(array('type'=>'post','options'=>array('url'=>array('controller'=>'contacts','action'=>'add'),'update'=>'ajaxResponse','indicator' => 'ajaxInd'))); When i submit it, i receive as ajax response the same page (/views/pages/contact.ctp). It seems the request doesnt get to my action URL /contact/add
# Oct 22nd 2009, 16:27 dogmatic69 brookshire: have you heard of MVC
# Oct 22nd 2009, 16:27 brookshire but, if you can make it work in the model, that is probably more appropriate
# Oct 22nd 2009, 16:26 brookshire i think it's perfectly fine to do validation in components using invalidate
# Oct 22nd 2009, 16:25 dogmatic69 arz: no validation in components
# Oct 22nd 2009, 16:25 arz Ceeram, well ok, this code produces the output i want, i can move it to be component, create another model, try to validate there ... well i'm lost =(
# Oct 22nd 2009, 16:25 dogmatic69 ACTION hands Ceeram a beer
# Oct 22nd 2009, 16:24 dogmatic69 jbcrawford: that normally happens when you explain it properly
# Oct 22nd 2009, 16:24 Ceeram then bring me a beer within 5 minutes from now
# Oct 22nd 2009, 16:24 jbcrawford dogmatic69: I have a model with a habtm relationship, I am creating a search and I need to limit the results to specific items in the relationship....actually I think I just answered my question
# Oct 22nd 2009, 16:24 dogmatic69 Ceeram: yes anything
# Oct 22nd 2009, 16:23 Ceeram dogmatic69: anything?
# Oct 22nd 2009, 16:23 brookshire jbcrawford: yes, as long as you are not trying to query the join table
# Oct 22nd 2009, 16:22 dogmatic69 jbcrawford: anything is possible, what do you want to do exactly?
# Oct 22nd 2009, 16:22 jbcrawford is it possible to query a model with a condition for a specific item in a habtm relationship?
# Oct 22nd 2009, 16:21 dogmatic69 sphereweb: <sphereweb> it has been a while since i didn't use IRC :) that is more like you have been here all the time and its been long since you werent on IRc
# Oct 22nd 2009, 16:20 sphereweb roger that :)
# Oct 22nd 2009, 16:20 Ceeram ~tell sphereweb about ask
# Oct 22nd 2009, 16:20 dogmatic69 sphereweb: #ajax
# Oct 22nd 2009, 16:20 Ceeram btw i think this should be a datasource instead of a model
# Oct 22nd 2009, 16:20 sphereweb it has been a while since i didn't use IRC :) i feel old hehe. Anyways i am here because i stumbled over an ajax issue. Anyone could give me a hand?
# Oct 22nd 2009, 16:19 Ceeram arz: did you notice that bakery article was written for 1.1?
# Oct 22nd 2009, 16:19 brookshire in your model and it will use that method instead
# Oct 22nd 2009, 16:19 brookshire arz: you can redeclare save
# Oct 22nd 2009, 16:18 arz hmm .. i never tried to do save method, on that model
# Oct 22nd 2009, 16:18 sphereweb hello :)
# Oct 22nd 2009, 16:18 brookshire check in the controller and use controller->invalidate()
# Oct 22nd 2009, 16:18 Ceeram sorry got it wrong
# Oct 22nd 2009, 16:18 Ceeram its arz his problem instead of brookshire
# Oct 22nd 2009, 16:18 arz =)
# Oct 22nd 2009, 16:17 brookshire or
# Oct 22nd 2009, 16:17 brookshire that is another way of doing it
# Oct 22nd 2009, 16:17 Ceeram ehm question is it arz or brookshire that is trying to do this validation
# Oct 22nd 2009, 16:17 brookshire i would probably override model->save to make it easier for you
# Oct 22nd 2009, 16:17 arz and that way of setting options for "model" is described in readme