Data validation in a different controller
I'm not sure of the best path here. Here's what I'm doing right now: I have a user table, and I have a couple different types of users. I figured I would create a signup controller, and have it *use* the User model. When I create my form in the signup/typeA view, I still make it on the user Model, but then that posts to the user controller, which I'm ok with, but I'd like to be redirected back to the Signup controller if there's a problem I've got that working too, but my problem is that if there are validation errors, I can't get it to show up 'magically' when I redirect back to the referring Signup page. Is there just some "set" that I need to do? I'm sure its been done, and will be simple, I just can't figure out what it is. Any help would be appreciated. Thanks, Bob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Plugin images (any update?)
I've found a couple posts regarding plugin images, and didn't know if anything has changed in the last few builds. Is there a good post on the best way to have a plugin contain images that it needs? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
REST routing
I am trying to take advantage of the default rest routing, and can't seem to get it to work. I think the issue is that my ID I'm passing isn't numeric. 1) Is there someway to override the "ID must be numeric" regex if I'm using an email as an id instead? 2) Is there a list of the various routes that are created w/ the mapResources command? What I'm looking for is a couple of Router::Connect( ) examples that represent what happens in that command. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Using maven for deployment
Has anyone experimented with using maven to bundle their website, and accumulate dependencies? I'm being asked to do so for our website, as all our other projects are integrated into this deployment strategy. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Javascript library + images + etc as Vendor?
I'm trying to figure out where to put this javascript library and its associated files. I can't seem to figure it out. I put it in the app level vendor directory, but then I'm not sure how to access the images. I tried looking at the vendor examples, but they're pretty empty. Thanks bob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Where to put new functions
Is that *really* where this belongs? Shouldn't this be treated as a helper? http://book.cakephp.org/view/98/helpers On Jun 5, 9:36 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote: > Anything you put in your ~/app/bootstrap.php will be available > everywhere. > > On Jun 5, 3:17 pm, moment11 <[EMAIL PROTECTED]> wrote: > > > I want a simple function that I can use in all my views: > > > function export_var($the_var) { > > if (isset($the_var)) { > > return $the_var; > > } else { > > return ""; > > } > > } > > > I'm not really sure where to put this in the cakephp code such that I > > can use it throughout all my views. > > > Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Complex findAll/Count, and specifying conditions on the HABTM
I just noticed I copied something wrong. This is correct: http://bin.cakephp.org/saved/29464 On Mar 4, 8:25 pm, Bob Mattax <[EMAIL PROTECTED]> wrote: > Here is a link to the code for my classes.http://bin.cakephp.org/saved/29458 > > On Mar 2, 8:04 pm, Bob Mattax <[EMAIL PROTECTED]> wrote: > > > I'm trying to write an app for managing some of rental properties. > > Here is a basic outline of the models I'm trying to work with right > > now. I'm working on making the functions in my model to handle > > paginating the results. > > > A - Campus > > id > > HABTM Building > > B - CampusesBuilding > > campus_id > > building_id > > distance > > C - Building > > HABTM Campus > > hasMany Units > > D - Unit > > belongsTo Building > > building_id > > rent > > beds > > baths > > > I'm trying to use a findAll and specify conditions on Campus, > > CampusesBuilding, and Unit. Specifically, I'm providing a Campus > > .id, CampusesBuilding.distance, and Unit.rent/beds/baths. > > > I'm trying this by writing the custompaginate, and paginateCount > > functions on the Unit. I can get it to work fine until I try adding > > the condition that relates to the distance field. Once I add the > > distance field, I get the "unknown field" error, for > > CampusesBuilding.distance. I'm collecting all the conditions and > > passing them all to thepaginatefunction. Is there some intermediate > > step I should be doing, or maybe starting from the other end. > > > Should just performingpaginateon Unit work? > > $this->Unit->paginate($allconditions) , or should I start at the > > Campus? $this- > > >Campus->CampusesBuilding->Building->Unit->findAll($cond...) Maybe it > > > doesn't matter. > > > Is this something that will improve if I upgrade to a newer version of > > CakePHP? I'm on version 1.2.0.5427alpha. > > > Any help would be appreciated. If you need more specfics, like the > > actual models I have set up, I can probably put together a > > bin for it all. > > > Thanks, > > Bob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Complex findAll/Count, and specifying conditions on the HABTM
Here is a link to the code for my classes. http://bin.cakephp.org/saved/29458 On Mar 2, 8:04 pm, Bob Mattax <[EMAIL PROTECTED]> wrote: > I'm trying to write an app for managing some of rental properties. > Here is a basic outline of the models I'm trying to work with right > now. I'm working on making the functions in my model to handle > paginating the results. > > A - Campus > id > HABTM Building > B - CampusesBuilding > campus_id > building_id > distance > C - Building > HABTM Campus > hasMany Units > D - Unit > belongsTo Building > building_id > rent > beds > baths > > I'm trying to use a findAll and specify conditions on Campus, > CampusesBuilding, and Unit. Specifically, I'm providing a Campus > .id, CampusesBuilding.distance, and Unit.rent/beds/baths. > > I'm trying this by writing the custompaginate, and paginateCount > functions on the Unit. I can get it to work fine until I try adding > the condition that relates to the distance field. Once I add the > distance field, I get the "unknown field" error, for > CampusesBuilding.distance. I'm collecting all the conditions and > passing them all to thepaginatefunction. Is there some intermediate > step I should be doing, or maybe starting from the other end. > > Should just performingpaginateon Unit work? > $this->Unit->paginate($allconditions) , or should I start at the Campus? > $this- > >Campus->CampusesBuilding->Building->Unit->findAll($cond...) Maybe it > > doesn't matter. > > Is this something that will improve if I upgrade to a newer version of > CakePHP? I'm on version 1.2.0.5427alpha. > > Any help would be appreciated. If you need more specfics, like the > actual models I have set up, I can probably put together a > bin for it all. > > Thanks, > Bob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Complex findAll/Count, and specifying conditions on the HABTM
I'm trying to write an app for managing some of rental properties. Here is a basic outline of the models I'm trying to work with right now. I'm working on making the functions in my model to handle paginating the results. A - Campus id HABTM Building B - CampusesBuilding campus_id building_id distance C - Building HABTM Campus hasMany Units D - Unit belongsTo Building building_id rent beds baths I'm trying to use a findAll and specify conditions on Campus, CampusesBuilding, and Unit. Specifically, I'm providing a Campus .id, CampusesBuilding.distance, and Unit.rent/beds/baths. I'm trying this by writing the custom paginate, and paginateCount functions on the Unit. I can get it to work fine until I try adding the condition that relates to the distance field. Once I add the distance field, I get the "unknown field" error, for CampusesBuilding.distance. I'm collecting all the conditions and passing them all to the paginate function. Is there some intermediate step I should be doing, or maybe starting from the other end. Should just performing paginate on Unit work? $this->Unit- >paginate($allconditions) , or should I start at the Campus? $this- >Campus->CampusesBuilding->Building->Unit->findAll($cond...) Maybe it doesn't matter. Is this something that will improve if I upgrade to a newer version of CakePHP? I'm on version 1.2.0.5427alpha. Any help would be appreciated. If you need more specfics, like the actual models I have set up, I can probably put together a bin for it all. Thanks, Bob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Table-less model associations
I have a situation where I'm interacting w/ an API where I have to use some webservices to access data from a User and Account table. I've figured out for the most part how to handle the models just by themselves, but am looking for information on whether I will be able to take advantage of hasOne, belongsTo associations between table-less models. I have some more models available via the API that I would like to explore having associations to as well. Is there any way to do this? Thanks, Bob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: More HABTM : Adding another model to the filtered findAll()
If I just make the query, will I still have the same abilities for pagination? I thought I remembered reading that I wouldn't. On Oct 24, 5:36 am, dardosordi <[EMAIL PROTECTED]> wrote: > Maybe it's just easier to make your query. > > On Oct 23, 12:20 pm, Bob Mattax <[EMAIL PROTECTED]> wrote: > > > So, I've continued reading, and to say that I've read "all" the > > threads on this topic would be a lie, but I'm trying. Any help would > > still be appreciated. > > > On Oct 22, 8:27 am, Bob Mattax <[EMAIL PROTECTED]> wrote: > > > > I've looked through and tried all of the HABTM filtering discussions, > > > and have tried to adapt them to my needs, but I just can't seem to get > > > it to work. Here is the basic set of relationships that I'm trying to > > > find results for: > > > > Units -> Buildings -> HABTM <- Campuses > > > > I'm working on making a small rental property application, and I want > > > to be able to find the units with certain specs that match certain > > > criteria for the unit, but also exist within a certain campus. I've > > > tried binding models on the fly, but I'm not getting very far. The > > > queries displayed in my debugging always come short of including all > > > the joins I would have expected. > > > > Any help would be appreciated. > > > > Thanks, > > > Bob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: More HABTM : Adding another model to the filtered findAll()
So, I've continued reading, and to say that I've read "all" the threads on this topic would be a lie, but I'm trying. Any help would still be appreciated. On Oct 22, 8:27 am, Bob Mattax <[EMAIL PROTECTED]> wrote: > I've looked through and tried all of the HABTM filtering discussions, > and have tried to adapt them to my needs, but I just can't seem to get > it to work. Here is the basic set of relationships that I'm trying to > find results for: > > Units -> Buildings -> HABTM <- Campuses > > I'm working on making a small rental property application, and I want > to be able to find the units with certain specs that match certain > criteria for the unit, but also exist within a certain campus. I've > tried binding models on the fly, but I'm not getting very far. The > queries displayed in my debugging always come short of including all > the joins I would have expected. > > Any help would be appreciated. > > Thanks, > Bob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
More HABTM : Adding another model to the filtered findAll()
I've looked through and tried all of the HABTM filtering discussions, and have tried to adapt them to my needs, but I just can't seem to get it to work. Here is the basic set of relationships that I'm trying to find results for: Units -> Buildings -> HABTM <- Campuses I'm working on making a small rental property application, and I want to be able to find the units with certain specs that match certain criteria for the unit, but also exist within a certain campus. I've tried binding models on the fly, but I'm not getting very far. The queries displayed in my debugging always come short of including all the joins I would have expected. Any help would be appreciated. Thanks, Bob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---