I tried it all. It seems to be not a problem of plurals, my colleague
is not a cake expert, he was just there for code review.
Is there any other setting to be done?
On Jul 4, 7:24 pm, "Jonathan Snook" <[EMAIL PROTECTED]> wrote:
> Go back to how you originally had it and then use franky's advice and
> just pluralize the table name.
>
> On Fri, Jul 4, 2008 at 10:10 AM, Sai Krishna <[EMAIL PROTECTED]> wrote:
>
> > It changed the file names accordingly
> > i.e
> > application_tool_controller is controller and class name is
> > ApplicationToolController
> > application_tool is the model name and class name is ApplicationTool
> > application_tools is the table name
>
> > with this view is getting messed up which has a javascript variable
> > defined in them.
>
> > My Old file naming was the other way
> > application_tools_controller is controller name while class name is
> > ApplicationToolsController
> > ApplicationTool is model name and while class name ApplicationTool
> > application_tools is the table name
>
> > with this view works fine, even saving of data and all other
> > functionality is achieved but data validation does not seem to
> > happen.. Are my old file namings wrong?
>
> > On Jul 4, 6:20 pm, francky06l <[EMAIL PROTECTED]> wrote:
> >> What is your model file name ? Should be application_tool.php, table
> >> name should be plural : application_tools ..
> >> hth
>
> >> On Jul 4, 2:52 pm, Sai Krishna <[EMAIL PROTECTED]> wrote:
>
> >> > Hey Just an update on this. One of my fellow coder has said that I'm
> >> > doing a mistake by using plurals
> >> > My App controller name is plural to Model
>
> >> > If the controller name is
>
> >> > ApplicationToolsController and Model name is ApplicationTool and
> >> > database table is application_tool and view directory name
> >> > application_tools.. I tried making everything singular with exception
> >> > of database table. but no luck.. Can somebody tell me where am I doing
> >> > wrong?
>
> >> > On Jul 4, 11:23 am, Sai Krishna <[EMAIL PROTECTED]> wrote:
>
> >> > > Hi,
>
> >> > > I'm a newbie to cakePHP 1.2. I had been working module in which I had
> >> > > been doing the following model validation. The validation never fails,
> >> > > what am I doing wrong
>
> >> > > Model contains this
> >> > > -----------------------------------------------------------------------------------------------------------------
> >> > > var $name='MyModule';
> >> > > var $validate = array(
> >> > > 'module'=>array(
> >> > > 'rule'=>'numeric',
> >> > > 'message'=>'Not a valid module
> >> > > selected'
> >> > > ),
> >> > > 'description'=>array(
> >> > > 'rule'=>array('custom','/[A-Z0-9_-\\\/
> >> > > [EMAIL PROTECTED]&\*\(\)]+/si')
> >> > > 'message'=>'Not a valid character in
> >> > > the description'
> >> > > )
>
> >> > > );
> >> > > ----------------------------------------------------------------------------------------------------------------
> >> > > And in Controller I do this, $this->data comes from a an ajax form
> >> > > ----------------------------------------------------------------------------------------------------------------
> >> > > $this->Model->set($this->data);
> >> > > echo $this->Model->validates();
> >> > > ----------------------------------------------------------------------------------------------------------------
> >> > > this validation ever returns 1. what am I doing wrong?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---