Hi Vijay,
Have a look at the source of controller.php in constructClasses() and you will
see what Ralph is experiencing. Line numbers are indicative of r8204 (current
branch).
line 448:
$id = $this->passedArgs['0'];
line 452:
$this->loadModel($this->modelClass, $id);
Cheers,
Adam
- Orig
Yes, whether it is right or not, that is the way cake behaves. You should
always use Model::create() before saving a new record just in case.
For the extra paranoid, you can do this on your add() action:
$this->Model->create($this->data, false);
$this->Model->save();
The second parameter (fals
Each and every CakePHP app is like a hand-woven Persian rug - unique and
each comes with its own beautiful imperfections.
I implore you to accept our flaws as part of our personality and embrace all
that is CakePHP!
Cheers,
Adam
- Original Message -
From: "Nate Brunette"
To: "CakePH
ail.com" wrote:
> Hi Adam,
> thanks a lot, I did not realize that it is so easy... I have already
> try it and it is working. :)
> anyway good point with the whole path...
>
> Tomas
>
> On Jun 23, 12:45 pm, "Adam Royle" wrote:
>
> > Setup
Setup a route like this:
Router::connect('/categories/*', array('controller' => 'categories',
'action' => 'index'));
Then in your index() method of CategoriesController you can then check for
the additional params in $this->params...
This is not so dissimilar how Cake's PagesController works.
ion in a standard way?
Thanks,
Mateo
On 22 jun, 00:45, "Adam Royle" wrote:
> Yes. You must start and end atransactionwith the same mysql connection.
> MySQL connections are automatically closed once the page has finished
> executing. Aredirectstops the current page executi
Yes. You must start and end a transaction with the same mysql connection.
MySQL connections are automatically closed once the page has finished
executing. A redirect stops the current page execution.
Cheers,
Adam
- Original Message -
From: "Mateo San Román"
To: "CakePHP"
Sent: Monda
Does this work?
$this->Item->setSource($locationId.'_items');
Cheers,
Adam
On Jun 19, 12:43 pm, VisionIzoizo wrote:
> Hi, I have one big table named 'items'. It's split into many views,
> according to a custom defined criteria (location). I want to access
> these views dynamically, I tried the
Look into admin routing in the cakephp cookbook.
Cheers,
Adam
On Jun 19, 12:44 pm, thatsgreat2345 wrote:
> I'm a little confused by routes at the moment. Currently I have an
> admin structure where each function such as
> function users($load = null, $id = null) {
> $this->viewPath = 'admin
Put this in app/views/users/xml/index.ctp
';
echo $xml->serialize($users, array('format' => 'tags'));
echo '';
?>
and put this in app/views/layouts/xml/default.ctp
header();
echo $content_for_layout;
?>
XML it doesn't show as XML in your browser if debug is set to 2,
because RequestHandler won
I see from a previous email you overrode your AppHelper to automatically
prepend "/fb" onto all of your links which is causing the prob. Short of
re-writing your links everywhere, you could modify this method so absolute
files are not prepended with "/fb".
Cheers,
Adam
- Original Message
A bit hard to diagnose without seeing any code... but is your form posting
to the login action?
And also make sure cookies are enabled in your browser.
Cheers,
Adam
- Original Message -
From: "uday"
To: "CakePHP"
Sent: Thursday, June 18, 2009 7:36 AM
Subject: Auth Problem using in
There is no code you need to change to get ssl working with cakephp. Make
sure you have ssl setup on the site correctly with just static files first.
Cheers,
Adam
- Original Message -
From: "rakesh singh"
To: "CakePHP"
Sent: Wednesday, June 17, 2009 8:43 PM
Subject: https
>
> hi...
ginal Message -
From: "Marcel"
To:
Sent: Wednesday, June 17, 2009 10:58 PM
Subject: Re: CakePHP XSS protection?
>
> Adam Royle wrote:
>> You need to handle this manually. Look at the Sanitize class for cake's
>> built-in methods.
>>
>> http://api.cake
You need to handle this manually. Look at the Sanitize class for cake's
built-in methods.
http://api.cakephp.org/class/sanitize
If you don't need the user to enter any html at all, consider using the h()
method while outputting your data, which will convert any html tags to their
entities so
Why certainly! In your AppController add this:
function beforeFilter() {
if (!empty($this->params['facebook'])) {
$this->viewPath = 'fbml';
}
}
And then you would have your fbml view in:
app/views/YourModel/fbml/index.ctp
and then you put your xhtml view in:
app/views/YourMode
Decrypt" in
the Post model...all it did was a find('all') with recursive set to 3.
I then pr()'d the result and used die() to stop operation. All post
titles were decrypted (they were encrypted in the database) but the
user emails showed up as encrypted.
On Jun 16, 9:24 pm, &
If I am doing something like this I generally just create a string and pass
it through. Make sure to encapsulate it in parenthesis () in case you have
other conditions.
$event_conditions = array(
'(Event.start BETWEEN DATE_SUB(CURDATE(), INTERVAL 1 DAY) AND
DATE_ADD(CURDATE(), INTERVAL 7 D
>
> $transaction_amount_total = $this->set('transaction_amount_total',
> $this->Jurisdiction->Transaction->find('all',array('conditions'=>array
> ('Transaction.jurisdiction_id ='=>$id),'fields' => array
> ('Transaction.id'
Wow. Sorry, I didn't read your entire email. But a few things..
1) Yes, generally you have just one table per model per controller.
2) A more flexible solution is to have your menu heirarchy to be separate
from your controller/action heriarchy. This will allow you to separate your
visual naviga
I am fairly certain that each related model will take care of it's own
beforeSave and afterFind callbacks, so you should just need to handle
encryption/decryption for the primary model, and each other model that is
saved/found will handle its own as well.
Cheers,
Adam
- Original Message -
ay, June 16, 2009 8:32 PM
Subject: Re: Problem with Large Datasets
Thanks for replying.
Actually, I've got everything properly indexed and closely followed standards
on that. I honestly just wanted to avoid writing a custom query (lazy me). Was
only hoping that there was a way to avoid
Hi Femi,
You should really just use one query for that with a number of joins and let
the database do all the work. My advice is to get someone familiar with sql and
construct the raw query and get it running at a decent speed inside the mysql
console, and then find a way to get that sql into c
book'] were set? Would this be possible using
routing or would I have to do something else?
On Jun 15, 10:36 pm, "Adam Royle" wrote:
> Sure...
>
> Router::connect('/AppName/facebook/:controller/:action/*',
> array('facebook'
> => 1));
>
>
Sure...
Router::connect('/AppName/facebook/:controller/:action/*', array('facebook'
=> 1));
then in your app controller just check for
$this->param['facebook']
- Original Message -
From: "Greg Baker"
To: "CakePHP"
Sent: Tuesday, June 16, 2009 10:28 AM
Subject: routing to control la
"cake" is a shell script which needs to be chmod'ed to 755 to allow being
executed (also chmod +x will do that)
If you're getting the output of the file instead of it being executed, then
it seems you're passing the script onto something else (such as the php
interpreter) rather than executing
use this function, it works well...
// recursively reduces deep arrays to single-dimensional arrays
// $preserve_keys: (0=>never, 1=>strings, 2=>always)
function array_flatten($array, $preserve_keys = 1, &$return = array()) {
foreach ($array as $key => $child) {
if (is_array($child)) {
$re
chmod +x /home/mileswj/cake/console/cake
then put this in cron
/home/mileswj/cake/console/cake your_shell_name -app /home/mileswj/
sc2armory.com/app/
Cheers,
Adam
On Jun 15, 6:25 pm, Miles J wrote:
> Heres my current folder setup.
>
> /home/mileswj/cake/ (below root and shared between many a
You will need to exclude the portfolio directory from being sent to your
default cake installation. Something like this might work...
RewriteEngine on
RewriteRule^$ app/webroot/[L]
RewriteCond %{REQUEST_URI} !^/portfolio(/|$)
RewriteRule(.*) app/webroot/$1 [L]
- Or
I guess it depends if you have any shared images that might be generic and
used with all languages.
If you want to override the helper, you can do it by creating an AppHelper
class in app/app_helper.php
Although this does change your functionality and you would have to duplicate
any shared im
http://book.cakephp.org/view/809/find-count
- Original Message -
From: "Wayne"
To: "CakePHP"
Sent: Sunday, June 14, 2009 6:55 PM
Subject: Cakephp equivalent of mysql_fetch_row
>
> Hi,
> i need a function that returns the number of rows from a table. How
> do i do that in cakephp?
>
>
I found this problem too, when I was sending emails using a cron job, and
needed to link back to the site. However there is an easy workaround.
I am using the EmailTask from the Bakery, and added importing the router and
routes definitions in here.
To: "CakePHP"
Sent: Sunday, June 14, 2009 3
Something like this should work (as long as you include the
RequestHandler component). Personally, I use an extra field "rank" in my
table which is just an integer.
if ($this->RequestHandler->isAjax() &&
!empty($this->params['form']['tableId'])) {
foreach ($this->params['form']['tableId']
Can you be more explicit about what you are looking for? Is there
something in particular you don't know how to do?
Adam
webperson wrote:
> Hello,
>
> Does anyone know of a single sole source of free phpcake tutorials? I
> have found and completed all of the ones I could find, but I am
> assumi
not select Model.id also? Any ideas
> on an alternative way to do this? It really sucks if I have to start
> doing manual queries after getting so far without them.
>
>
> Thanks,
>
> -Blake
>
>
>
> On Mar 2, 7:16 pm, Adam Royle wrote:
>
>> I thin
Yes, CakePHP has a separate folder for each controllers views, but I
would imagine if you had a ton of controllers you might want to separate
them anyway?
I recommend you stick with the conventions to start with, and further
down the track if you still want to change it, you'll find a way.
Che
I think the majority of CakePHP users are using MySQL, so it could be a
bug in the cake's MSSQL datasource. You should do some investigating
into what query is generated, does it run if you try it through sql
server directly? If not, what needs to be changed for it to work? Then
look at the ms
Looking at the Security component source, you need to override the
validatePost value in SecurityComponent. The following is untested code,
but I think it should work.
function beforeFilter() {
if ($this->action == 'your_action') {
$this->Security->validatePost = false;
}
Have you looked into admin routing?
You'll just need to prefix your actions and your views with "admin_" to get
it to work (and enable it in app/core.php)
And then set up a route for your admin homepage, which would point to
AdministratorsController::admin_dashboard()
Router::connect('/admin'
Both protaculous and jquery (and prob most other js libraries) have a
sortable function so you can drag and drop records (re-ordering) with
your mouse, and a serialize function so you can send the re-ordered ids
back to the server to update the database.
I'm sure you could also do the move up/
Due to the way plugin controllers work with inheritance, you can only
access the plugin's beforeFilter logic when the page is requested
through the plugin (ie. /plugin/controller/action/)
From what I can tell you want to execute plugin logic from your base app?
The proper way to do this is by
I think you're on the right track with your thinking.
1) You should route to your "users" controller, not the pages controller
Router::connect('/search', array('controller' => 'users', 'action' =>
'search'));
2) You should explicitly set your search form url.
echo $form->create('User',array
What data type are you using for your lft and rght columns?
I'm not sure if it will help you, but have a browse over my article
which has all the code to get the Tree behavior working and see if
you're doing anything differently.
http://blogs.bigfish.tv/adam/2008/02/12/drag-and-drop-using-ext-
You might want to give some examples of your code if you want anything
more specific than what I have said.
However, if you aren't already, use Firebug to look at what URLs flash
is requesting.
And make sure you have debug = 0 when doing this so you can easily see
404 errors when they occur.
Brian is right. You need to change the path to be relative to the root
of your site, not the page.
So change this:
media/jpgrotator.swf
to this:
/media/jpgrotator.swf
In all instances and it should work.
Also, if you are loading other swfs, images, text files, etc, from
inside flash, those
Try debugging by putting logging statements in your code step by step and
see what you get.
$this->log('yayaya');
And you can check them inside app/tmp/logs/
Cheers,
Adam
- Original Message -
From: "benjam"
To: "CakePHP"
Sent: Saturday, February 21, 2009 8:15 PM
Subject: Debug off
amatically access an email account.
>
> L
>
> On Feb 19, 10:17 am, Adam Royle wrote:
>
>> Depends on your server setup. Two solutions:
>>
>> 1. Write a script that is called periodically through cron that checks
>> an email mailbox for new messages.
>>
Depends on your server setup. Two solutions:
1. Write a script that is called periodically through cron that checks
an email mailbox for new messages.
2. Setup your email account to pipe to a script instead of to a mailbox.
I have used #2 and it works well because the script only runs when it
Sounds like you have a typo somewhere (maybe you've got plural instead
of singular?). Cake automatically creates models if they don't exist.
Therefore it is creating a model (an instance of AppModel) and your
method is not defined in AppModel.
Make sense?
Adam
Mr Speaker wrote:
> I think I mu
I think the comments should stay, but improve the functionality to make
them more useful/constructive.
Develop a upvote/downvote system for comments. This should eliminate
stupid comments from wasting people's time, and the popular comments
should indicate what parts of the manual could be imp
I would probably add another model, Post, like you've mentioned. I would
also probably create a behaviour that would exist in all the sub-post
models, which would add and remove a link from the Post model on
save/delete.
Although I haven't used it myself, it looks like you could then use
AD7s
var $hasAndBelongsToMany = array('Developer','Publisher');
- Original Message -
From: "mklappen"
To: "CakePHP"
Sent: Tuesday, February 17, 2009 9:24 AM
Subject: Can you have multiple hasAndBelongsToMany relationships in one
model?
>
> Hi,
>
> I'm new to cake and this group, I would
Your syntax is not valid. Try reading up on the new form helper on the
cookbook.
http://book.cakephp.org/view/183/Creating-Forms
Cheers
Adam
simon...@gmail.com wrote:
> Good Night,
>
> I'm trying to make this code work but they are 3 problems with it.
>
> Here are the 3 errors:
>
> Method HtmlH
Have you checked your database connection? (Just a thought)
Also, with shells you need to ensure you execute the shell from the app
folder, or specify the path to your app in -app
Cheers,
Adam
Kyle Decot wrote:
> I'm trying to create a shell but I'm running into some problems. If I
> add $uses
I don't tend to cache data by itself, as like you've said it generally
won't save you much time vs mysql alone. I do use view caching on busy
sites for static content and also for elements, as it can give a
noticeable improvement.
I guess it really depends on your traffic and the type of site
I use svn:ignore on app/config/database.php, and only commit a generic
database.php.default file (that contains no usernames/passwords). Each
time I checkout the code (dev, staging, production) I rename
the .default file to database.php and make my edits on the server. So
ultimately no passwords a
I think you might benefit from a deploy script. I have a bash script
that updates the site code from subversion and clears my cache dirs at
the same time. I have command-line access and it runs on linux, so
it's pretty easy to do that.
On Feb 9, 9:30 am, Miles J wrote:
> Everytime I upload and u
I do something similar and it works quite well for my purposes,
however I save my images in /files/images/, and I use behaviors to
abstract the file management away from my model.
So usually I have something like this:
Image actsAs ImageBehavior (subclass of FileBehavior)
Cheers,
Adam
On Jan 31
Yes, it would be great to have a fully-fledged application example,
complete with "time to develop" and "lines of maintainable code"
benchmarks. And another one which measures mental anguish experienced
by the framework.
On Jan 26, 7:38 am, Miles J wrote:
> Yes I always hate benchmarks because i
I would recommend using routes to accomplish this - you don't need to
write to a static html file.
http://book.cakephp.org/view/542/Defining-Routes
Cheers,
Adam
On Jan 24, 6:48 pm, Sumesh G wrote:
> thanks for your reply
>
> i want to create the html pages with the dynamic contents,
> i had cr
Hi Carlosz,
#1. I find using a gui db program is much quicker than defining
everything in a text file. I use navicat and it's awesome.
However...
#2. CakePHP does have a thing called CakeSchema, which can be used to
generate table structures from a file definition. For more info, look
at the co
Can you explain why you need different tmp directories for the same
actual app? If it's for caching, etc, maybe you can use a cache prefix
dynamically?
Cheers,
Adam
Martin Westin wrote:
> Hi (again),
>
> I want to try to host one application under several domains.
>
> One Cake
> One App
> Many c
Btw, it wasn't deleted, only the "version" and "milestone" metadata
was deleted from the ticket. It is still an open ticket.
Cheers,
Adam
On Jan 19, 6:26 pm, kiang wrote:
> I submitted a ticket about adding tag feature to cache and it got
> deleted soon.https://trac.cakephp.org/ticket/5965
>
>
Personally I find it easier to define all associations and use
Containable or recursive = -1 to define what data I get back. It's
easier to understand for me and works fairly well, makes it quick to
develop and easy to debug.
The only potential downside is that every associated model is loaded,
w
This error happens when the image doesn't exist, and the request is
forwarded to cakephp. Make sure the file is there and case-sensitive
if on linux.
Cheers,
Adam
On Jan 16, 8:48 pm, g4b0 wrote:
> Hi all,
> I'm trying to put some images in /app/webroot/img/photo, but the
> following html doesn'
Yes, I would say most people use the controller/action/params type
urls.
Most people's thoughts about passing the action through a POST instead
of a GET to make it more secure are moot. You can fake (and modify
variables) in a POST request just as easy as you can with GET.
Your post indicates th
If it's just a simple function, then you can place it in bootstrap.php
and it will be globally available.
Cheers,
Adam
On Jan 12, 8:51 pm, Henrik Gemal wrote:
> I have a custom html escape function that I like to be able to use in
> two views.
> What's the best way to share function between vie
Try this in your model...
class Whatever extends AppModel {
function beforeSave() {
$data = &$this->data[$this->alias];
if (!empty($data['title'])) {
$data['title'] = ucwords($data['title']);
}
return parent::beforeSave();
}
}
Your could then m
I've had a tree with that many records and had no issues re-ordering
it (maybe 1-2 seconds max).
I seem to remember needing to set $this->MyModel->recursive = -1;
before calling the reorder methods. Maybe that is your problem - you
might be selecting more than you need to?
Maybe you should show
Maybe you could try a real tree component?
http://blogs.bigfish.tv/adam/2008/02/12/drag-and-drop-using-ext-js-with-the-cakephp-tree-behavior/
Cheers,
Adam
On Jan 9, 8:19 pm, "designv...@gmail.com"
wrote:
> Has anyone done aything along the lines of dynamically adding divs/
> select boxes as a
Hi Rob,
For complex conditions you're probably better off using a combination
of strings and arrays.
I find they're much simpler to read than cake's array syntax...
'conditions' => array(
array('alert_subject_id' => $subject),
'(Alert.start_date IS NULL OR Alert.start_date < NOW
No, accessing models by default is always singular, not plural.
On Jan 8, 1:21 pm, gearvOsh wrote:
> If it is within the Billings model itself, it is $this->.
>
> But if its used in a controller, it is $this->Billings->.
--~--~-~--~~~---~--~~
You received this mes
It is saying $this->Billings is not an object try singular - $this-
>Billing->findByFromApplication()
On Jan 8, 12:54 pm, "Louie Miranda" wrote:
> Guys,
>
> I have a field name from_application and I tried to do a:
>
> $results = $this->Billings->findByFromApplication('10');
> print_r($resul
Without seeing your sql code, it's hard to help, but I recommend you
learn the Model methods available to you, as it can often shorten the
amount of code needing to be written. Often I use a mixture between
arrays and strings for my conditions, etc, depending on how
complicated the query is.
$unr
Can you show your model & app model code? I'm guessing somewhere
you're not returning true from a beforeValidate() or beforeSave()
method.
Eg. you should do something like this if that's the case.
function beforeSave() {
if ( ) {
// cancel the save
return false;
} e
Just add a physical "amount" field to your orders table, and then add
a method to your Order model which calculates the order total and
updates the order. Then call that method whenever you add/modify/
delete your OrderProducts.
On Jan 6, 8:21 am, Yannis wrote:
> I have this kind of db structure
If you're sending unique data for each request, I wouldn't bother
using the MediaView. Just output data in your views and set some
custom headers.
You can also find out about an easier way to gzip output in cakephp
here:
http://debuggable.com/posts/issues-with-output-buffering-in-cakephp:480f4dd
Todays databases are designed to handle a crapload of queries, so
don't be afraid to take advantage of this. Just make sure you've got
indexes on the right columns and your queries are using those indexes.
You could possible create another table which is optimised to hold any
database changes made
It is my understanding that CakePHP is planning to migrate to jQuery
in the near future (much like the rest of the world, even my
grandmother, and she doesn't even have a computer!).
I use jQuery to add an extra row by cloning the last row, incrementing
the ids and names of the elements and appen
For simplicity's sake I would keep them in the one table, and
dynamically change the $validate array in my beforeValidate method of
the model to suit.
I've never used this but it may help you:
http://bakery.cakephp.org/articles/view/conditinalvalidation-behavior
Cheers,
Adam
On Dec 26 2008, 11:
I don't usually care about routes for my admin controllers since no
one except administrators see them, so if it was me I wouldn't worry
about it.
However you could probably simplify your routes:
Router::connect('/admin/islandnews/:action/*', array('controller' =>
'newsletters', 'admin' => true)
fine, but the
> second one doesn't.
>
> I've added it to the top of the Product model, just below the $name
> variable, like so:
>
> var $name = 'Product';
> var $order = 'Product.title ASC';
>
> Any idea?
>
> On Dec 30, 10:04 pm, Adam R
Yes, you've got the categories/products thing set up as I would do it.
With ordering, you can do it both ways:
1) Just for this association - use the 'order' key when setting up the
association in categories model... eg.
http://book.cakephp.org/view/78/Associations-Linking-Models-Together#Relat
Is it possible that you can just overwrite the tag list with your HTML
equivalents?
http://bakery.cakephp.org/articles/view/overriding-specific-html-tags-before-using-helper-methods
Cheers,
Adam
On Dec 29, 8:24 am, gearvOsh wrote:
> I have not found any option or setting for using HTML or XHTM
If your models are not directly related (as you've said above) you can
do this to load the other models.
var $uses = array('Job', 'OtherModel', 'OtherModel2');
function index() {
$this->OtherModel->find('all');
$this->OtherModel2->find('all');
// ... etc
}
Or if you won't be using the oth
Admittedly I skimmed through your post, but what sql is executed? Are
sure you sure you've attached the Containable behavior to your model?
Cheers,
Adam
On Dec 26, 1:28 pm, Aidan Lister wrote:
> I'm having trouble with the Containable behavior.
>
> My first query,
> $this->Controller->Paper->r
'link' => array('controller' =>
> 'movie_comments', 'action' =>
> 'feed', 'ext' => 'rss', $id),
> 'description' => 'Recent comments post
Controllers talk to models, not the other way round, so you would need
to call a method in your model from your controllers, passing the
params as necessary.
On Dec 23, 8:52 am, gearvOsh wrote:
> No not that. In the models beforeValidate() is it possible for me to
> do like $controller->params?
abled) and it's complaining about view
> not found but it's looking for the wrong one since the feed.ctp is in
> the views/movie_comments/rss/ dir as it is supposed to be.
>
> Thanks !
>
> Jérôme
>
> On 25 déc, 09:48, Adam Royle wrote:
>
> > Have you tried t
Have you tried turning debug to 2 and seeing what the error is?
Cheers,
Adam
On Dec 25, 3:40 am, Jne wrote:
> Hi,
>
> on my website I have a 'movie_comments' controller and a feed($id)
> action.
>
> With RC3 :http://sph3re.tv/movie_comments/feed/151.rssis outputting the proper
> RSS feedhttp://
I don't really understand your question... are you asking if you can
see what data is going to be saved from inside the beforeValidate()
method?
If so, look at $this->data
Cheers,
Adam
On Dec 22, 8:20 pm, gearvOsh wrote:
> Thanks, also is there a way I can get the parent controller data as
When defining class properties you can't use expressions - only data
structures, so you need to populate the $validate array dynamically
inside the model. You can do this in beforeValidate() method in your
model, but be sure to return true.
beforeValidate() {
$this->validate['fieldName'] = arra
I was the same as you when I first started, but over time I started
seeing the usefulness of cake's magic.
You can change the label easily by doing this:
input('email', array('label' => 'Your Email
Address:')); ?>
Cheers,
Adam
On Dec 22, 6:58 am, justclint wrote:
> I notice when I use the for
Oh, and make sure you have writable tmp folders and mod_rewrite and
AllowOverride, etc, all the things you should check for a standard
install.
On Dec 21, 6:44 pm, Petr Vytlačil wrote:
> Hi i developing a application for my friends, i try this applicaton on
> two webhosting (on local and other)
If you look at the page title, it says "PD Reality | Errors" - this
indicates there were errors. Double-check to make sure you have
uploaded all files, database connection is fine, and you've cleared
the tmp folders. Set debug = 2 and it should show you what is going
wrong. Otherwise, check the ap
The best solution is to write a patch and submit it into the cake
core.
On Dec 20, 11:22 am, Jaime wrote:
> Hi all,
>
> I did a nice app which makes heavy use of Inflector::slug() to convert
> "My Strings" inoto "my_strings".
>
> However, now I find that the core slug() function is not working w
If you are upgrading from 1.1 there could be many things that are
tripping you up. You controller code looks fine, although I would
change your view code to this:
create('User');
echo $form->input('about_me', array('type' => 'textarea');
echo $form->end('Submit');
?>
Also, in 1.2 "User/about_me"
Well, "Is" is not actually a plural... so... what behaviour would you
expect?
Maybe some context of where you are using this would be beneficial.
Cheers,
Adam
On Dec 19, 12:45 pm, bingo wrote:
> hi bakers,
>
> I just stumbled across a weird problem and not sure whether its a bug
> in my code o
By the way, you can also do this:
$this->log($this) if you want to really analyse the request. :)
Cheers,
Adam
On Dec 19, 12:13 am, WebbedIT wrote:
> Tested your theory that something in my page with a local relative
> path was calling the page again. To do this I added an extra
> parameter t
What you are doing is perfectly fine, I personally use $this->helpers
[] = 'Blah'; since it's quick and easy.
Cake will only load your helper once even if it appears multiple times
in your helpers array, so don't even worry about checking for this.
Heck, just include it twice to make sure it get
1 - 100 of 412 matches
Mail list logo