# |
Aug 7th 2008, 20:21 |
freebox |
thestaff: helper is for viewer |
# |
Aug 7th 2008, 20:21 |
polywog |
heh |
# |
Aug 7th 2008, 20:21 |
polywog |
ACTION hits himself over the head |
# |
Aug 7th 2008, 20:20 |
polywog |
grrrrrrrrrrrrrrrrrr |
# |
Aug 7th 2008, 20:20 |
thestaff |
how can I get acces to the html help in the controler ? |
# |
Aug 7th 2008, 20:20 |
polywog |
make the primary key in your habtm rating both cols |
# |
Aug 7th 2008, 20:20 |
freebox |
uhm |
# |
Aug 7th 2008, 20:19 |
polywog |
off the top of my head |
# |
Aug 7th 2008, 20:19 |
polywog |
users habtm ratings, ratings belong to posts, posts has many ratings |
# |
Aug 7th 2008, 20:19 |
polywog |
oic, so they don't rate more than once |
# |
Aug 7th 2008, 20:18 |
freebox |
ratings and users has no relationship? |
# |
Aug 7th 2008, 20:17 |
freebox |
no, users will rate my posts |
# |
Aug 7th 2008, 20:17 |
polywog |
you want to rate users as well? |
# |
Aug 7th 2008, 20:17 |
freebox |
and belongs to user? |
# |
Aug 7th 2008, 20:17 |
polywog |
then do some voodoo in your controller to calc the average rating before saving |
# |
Aug 7th 2008, 20:17 |
polywog |
if you are rating posts, then post hasone rating, rating belongs to post |
# |
Aug 7th 2008, 20:17 |
stabb |
HAI |
# |
Aug 7th 2008, 20:16 |
freebox |
posts/articles |
# |
Aug 7th 2008, 20:16 |
polywog |
what are you rating? |
# |
Aug 7th 2008, 20:15 |
freebox |
/ |
# |
Aug 7th 2008, 20:15 |
freebox |
i'm adding rating stars to my blog app. my question is about the relationship.. Rating belongsto user? Rating hasmany user? Rating belongsto post? etc.. |
# |
Aug 7th 2008, 20:15 |
SamuraiDio |
hi |
# |
Aug 7th 2008, 20:14 |
polywog |
jezek you might have to write a custom validation |
# |
Aug 7th 2008, 20:13 |
polywog |
woops, i meant Set::extract($incidents, '{n}.Action.{n}.actions_phone') |
# |
Aug 7th 2008, 20:13 |
polywog |
does anyone know if I how I can do __('actions_phone', true) => array_sum(Set::extract($incidents, '{n}.Action.{n}.actions_phone')), |
# |
Aug 7th 2008, 20:13 |
jezek |
how do i do validation on a input so that it can be left blank, but if it is not blank, then check if it is a url. |
# |
Aug 7th 2008, 20:12 |
polywog |
hey |
# |
Aug 7th 2008, 20:10 |
Chezz |
I am in the controller for model X i need to call a function in the controller in model Y.. i am doing this .. $this->Y->CustomFunc() but that isnt working.. its false.. i also tried $this->X->Y->CustomFunc() ... i have $uses on top.. but the models are not really related.. each model fetches from a different DB I cannot relate them. |
# |
Aug 7th 2008, 20:08 |
Chezz |
hmm |
# |
Aug 7th 2008, 20:07 |
Chezz |
for somereason i forgot to put ->model-> and i was expecting it to work |
# |
Aug 7th 2008, 20:07 |
Chezz |
alright |
# |
Aug 7th 2008, 20:07 |
markstory |
well if the code is inside the model you can just do $this->model->relatedModel->doStuff() |
# |
Aug 7th 2008, 20:06 |
Chezz |
how can i resuse it via model ? |
# |
Aug 7th 2008, 20:06 |
markstory |
or put it in app_controller. |
# |
Aug 7th 2008, 20:06 |
markstory |
then you can reuse it in all your controllers via the model. |
# |
Aug 7th 2008, 20:05 |
Chezz |
gwoo i have a custom function in the controller i need to call.. |
# |
Aug 7th 2008, 20:05 |
markstory |
if you need functionality in more than one controller perhaps that functionality is better placed in a model. |
# |
Aug 7th 2008, 20:05 |
gwoo |
WHY? |
# |
Aug 7th 2008, 20:05 |
gwoo |
Chezz: you know what the first question is right? |
# |
Aug 7th 2008, 20:05 |
markstory |
Chezz: you don't. |
# |
Aug 7th 2008, 20:04 |
Chezz |
how do I call a function in a controller from another controller ? |