# |
Sep 22nd 2011, 18:56 |
nnnnathann |
is there a way to render an element from a controller and return the string, without rendering output? |
# |
Sep 22nd 2011, 18:56 |
kidtangerine |
so i tried to contain account, and then status |
# |
Sep 22nd 2011, 18:56 |
kidtangerine |
scout: I need to get Status.closed which doesn't have an assoication with Promise, and I didn't want to do a recursive 2 and pull all that data |
# |
Sep 22nd 2011, 18:53 |
scoutmstershke |
then just set the condition accordingly |
# |
Sep 22nd 2011, 18:52 |
scoutmstershke |
why didn't you just associate it with the main model being called? |
# |
Sep 22nd 2011, 18:52 |
kidtangerine |
scout: can you give any suggestions for cleaning it up? |
# |
Sep 22nd 2011, 18:51 |
scoutmstershke |
simplier the better when it comes to php |
# |
Sep 22nd 2011, 18:51 |
scoutmstershke |
I'd rewrtie that make it more simplified |
# |
Sep 22nd 2011, 18:49 |
kidtangerine |
I thought it had to be specified for each table that you contain. |
# |
Sep 22nd 2011, 18:48 |
scoutmstershke |
let me re write that real wuick |
# |
Sep 22nd 2011, 18:48 |
ujjain |
Cakephp likes arrays, 5 in 1 line, that's impressive. |
# |
Sep 22nd 2011, 18:47 |
kidtangerine |
within the contain |
# |
Sep 22nd 2011, 18:47 |
kidtangerine |
But they are for different tables |
# |
Sep 22nd 2011, 18:46 |
scoutmstershke |
use one |
# |
Sep 22nd 2011, 18:46 |
ujjain |
hehe :) I am fairly new to Cakephp auth, session, acl, |
# |
Sep 22nd 2011, 18:46 |
scoutmstershke |
you have two conditions set kidtangerine |
# |
Sep 22nd 2011, 18:45 |
scoutmstershke |
dont listen to that last sentance |
# |
Sep 22nd 2011, 18:45 |
scoutmstershke |
nvm im wrong |
# |
Sep 22nd 2011, 18:45 |
scoutmstershke |
I have done some of the same things passing it through session is good just remmber if you write user id to a current session they will have to logout and log back in to refresh the session update |
# |
Sep 22nd 2011, 18:44 |
ujjain |
thanks |
# |
Sep 22nd 2011, 18:44 |
ujjain |
scoutmstershke: ok, will keep it that way then. Just wondered if my manual username to userid conversion was stupid. |
# |
Sep 22nd 2011, 18:43 |
scoutmstershke |
ujjain looks good to me bro |
# |
Sep 22nd 2011, 18:42 |
kidtangerine |
Whats wrong with it? |
# |
Sep 22nd 2011, 18:42 |
scoutmstershke |
its your condition |
# |
Sep 22nd 2011, 18:41 |
kidtangerine |
Can someone tell me why my code brings back all the records instead of the condition based query: http://pastie.org/2575250 |
# |
Sep 22nd 2011, 18:41 |
ujjain |
scoutmstershke: ok, thanks, will put it under the if(!empty) |
# |
Sep 22nd 2011, 18:41 |
scoutmstershke |
$loadmodel will only be called as the function is used |
# |
Sep 22nd 2011, 18:40 |
scoutmstershke |
$uses is called everytime the controller is accessed |
# |
Sep 22nd 2011, 18:40 |
ujjain |
$privatemessage['User']['username'] |
# |
Sep 22nd 2011, 18:40 |
scoutmstershke |
then why not use $this->loadmodel('model');? |
# |
Sep 22nd 2011, 18:40 |
ujjain |
but I do use $privatemessage['User'] in the view |
# |
Sep 22nd 2011, 18:40 |
ujjain |
in this controller. |
# |
Sep 22nd 2011, 18:40 |
ujjain |
I am only using $this->User once, if that's the question. |
# |
Sep 22nd 2011, 18:39 |
scoutmstershke |
is it a table you are using once? |
# |
Sep 22nd 2011, 18:39 |
ujjain |
scoutmstershke: I wonder if I should use var $uses, I wonder if the function send() is bad with the ->User->find. |
# |
Sep 22nd 2011, 18:38 |
Zion2014 |
and ideas? |
# |
Sep 22nd 2011, 18:38 |
ujjain |
scoutmstershke: http://pastie.org/2575238 might look a bit better. |
# |
Sep 22nd 2011, 18:38 |
Zion2014 |
Hey guys, I"m using the Html->link helper method and it has some the ® charcter and it won't render |
# |
Sep 22nd 2011, 18:38 |
scoutmstershke |
I dont like tattos anyway |
# |
Sep 22nd 2011, 18:38 |
ujjain |
hehe good, it's a bad idea to have such a tattoo |
# |
Sep 22nd 2011, 18:37 |
draginx |
whats wrong with this code and why isnt it actually logging me in? |