Logs for #cakephp

Page 23 of 36,922, showing 100 records out of 3,692,143 total, starting on record 2,201, ending on 2,300

# At Username Text
# Aug 7th 2008, 04:27 poluta1 i can't modify AppModel model class attributes
# Aug 7th 2008, 04:27 thestaff what do you use ?
# Aug 7th 2008, 04:27 pgcd Ok, so set::extract works great to make lists - what I can't seem to do without a foreach is having the list turned into a list of links, instead of strings...
# Aug 7th 2008, 04:28 stevieboy pgcd: maybe array_combine helps?
# Aug 7th 2008, 04:28 pgcd htmlhelper->link doesn't work with arrays, does it?
# Aug 7th 2008, 04:28 JeffEmbracedDC when using 'With' associations - is it possible to set up afterSave functions?
# Aug 7th 2008, 04:29 poluta1 Martz: ok thank Martz.. i'am waiting :)
# Aug 7th 2008, 04:29 stevieboy pgcd: do you see foreach as sth evil? you keep avoiding it
# Aug 7th 2008, 04:29 pgcd stevieboy: well, I could certainly extract both the ids and the names, but i fail to see how combining the arrays would help...
# Aug 7th 2008, 04:29 pgcd stevieboy: yep, i admit to being a bit wary of foreach...
# Aug 7th 2008, 04:30 stevieboy pgcd: lol, i cant see why. it's like the one with the guy who says "continue" is evil in loops
# Aug 7th 2008, 04:30 JeffEmbracedDC foreach is okay but it's usually not as fast as other loop methods .
# Aug 7th 2008, 04:30 pgcd stevieboy: somehow i feel i shouldn't have it in my views...
# Aug 7th 2008, 04:30 Martz poluta1: something like this - also read the comments in top. = 'foo'; would be the logic to grab whatever you want from Session::read() http://bin.cakephp.org/view/1267003022
# Aug 7th 2008, 04:31 stevieboy pgcd: that's just wrong,imho
# Aug 7th 2008, 04:31 pgcd stevieboy: we belong to the church of "Everything should be on one line", probably =)
# Aug 7th 2008, 04:31 JeffEmbracedDC hey martz ... you familiar with 'with' associations for join tables?
# Aug 7th 2008, 04:31 Martz poluta1: and if you try and implement it and get any errors, please bin your code of what you have (app controller, app model, and any models using it)
# Aug 7th 2008, 04:31 stevieboy pgcd: i meant you are wrong. foreach is usefull and the right approach for that
# Aug 7th 2008, 04:31 Martz JeffEmbracedDC: i ran away from HABTM and any complex queries I'd need for them a long time ago ;) Life is too short for HABTM! ;)
# Aug 7th 2008, 04:32 JeffEmbracedDC Martz: hah really? hmm
# Aug 7th 2008, 04:32 pgcd stevieboy: =) i'll use it... honestly, it's just that i'm so new to cakephp that I always expect there's a "neater" way of doing everything
# Aug 7th 2008, 04:33 stevieboy pgcd: cake helps with data retrival and so on. in the view it's mostly normal php with the vars
# Aug 7th 2008, 04:33 pgcd speed and memory usage of foreach don't worry me in this case, seeing as it's gonna be 3/4 records at most for every loop
# Aug 7th 2008, 04:33 Martz JeffEmbracedDC: yeah. I tend to make my schema now with a 3rd real model instead of a join table, so that I can add meta data, easily define complex conditions etc
# Aug 7th 2008, 04:34 JeffEmbracedDC Martz: well...... are you familiar with 'with' associations? which allow for added meta data and faux model access of the join table?
# Aug 7th 2008, 04:34 Martz JeffEmbracedDC: the downside, which someone pointed out to me, is that mysql isnt able to "ensure integrity" of not having the same 2 foreign keys, since they are not primary keys like in a HABTM join table. However that is solveable with validaiton and checking at the PHP level
# Aug 7th 2008, 04:35 Martz JeffEmbracedDC: im aware it exists, I played with it, but I dont use it
# Aug 7th 2008, 04:35 JeffEmbracedDC Martz: Gotchya
# Aug 7th 2008, 04:35 alkemann Martz: JeffEmbracedDC when using a with I have been forced to add an id field and put it as primary key, but that has worked well
# Aug 7th 2008, 04:35 pgcd stevieboy: that is good advice - it might save me a lot of time down the road if i just *do* things instead of perusing manual api and google to see if there's something else that does it
# Aug 7th 2008, 04:36 pgcd as somebody said, sometime it's quicker to just reinvent the wheel =)
# Aug 7th 2008, 04:36 stevieboy pgcd: it's always good to have an open eye. but mostly you can check the manual for the helpers provided. if you arent lucky there, try it the normal way
# Aug 7th 2008, 04:36 JeffEmbracedDC alkemann: works great in my opinion.. only downside I've come across so far.. is.. I'm not sure how you add beforeSave/afterSave/whatever functions to the faux model.. or if it's possible at all.
# Aug 7th 2008, 04:36 alkemann JeffEmbracedDC: u can make the with model in same way as other models
# Aug 7th 2008, 04:36 alkemann in fact cake makes a model for all habtm relationships
# Aug 7th 2008, 04:37 alkemann Users HABTM Groups => Model UsersGroup
# Aug 7th 2008, 04:37 JeffEmbracedDC alkemann: interesting.. I should maybe try that
# Aug 7th 2008, 04:37 Martz JeffEmbracedDC: it goes back to my point before: why have a join table, then stuff it full of meta data - and end up rebinding it as hasOne, using 'with' and all of the downsides and complexities.. when you could use a third "real" model instead of the join table and life would be much easier
# Aug 7th 2008, 04:37 alkemann sorry GroupsUser probably
# Aug 7th 2008, 04:39 alkemann Martz: i sorta agre. I have only used it for the created field and a boolean for if its two-way
# Aug 7th 2008, 04:40 alkemann Martz: so, u wanna test my behavior and see if u got some feature requests or bugs or something?
# Aug 7th 2008, 04:40 Martz alkemann: sure. and it has it uses, as you said with Users.. ACL with aro/aco/axo etc works great HABTM with meta data, but it has custom methods to handle all of that automagically
# Aug 7th 2008, 04:41 Martz alkemann: sure I will at some point. I've got a quick project to do first which wont need any logging (all image uploads and resizing with AD7Sixs attachment behavior :D) but i'll give it a shot. Do you have an SVN you can throw it in?
# Aug 7th 2008, 04:41 alkemann no sorry
# Aug 7th 2008, 04:41 Martz do you want one?
# Aug 7th 2008, 04:42 Martz i can set one up for you if you like
# Aug 7th 2008, 04:42 alkemann bit overkill for just a behavior though isnt?
# Aug 7th 2008, 04:43 Martz perhaps
# Aug 7th 2008, 04:43 Martz i throw everything in repos :P
# Aug 7th 2008, 04:43 achew22 use one of the free services
# Aug 7th 2008, 04:43 achew22 google code = 30 sec
# Aug 7th 2008, 04:43 alkemann all u need right here http://bin.cakephp.org/saved/35826
# Aug 7th 2008, 04:44 Martz ACTION bookmarks
# Aug 7th 2008, 04:44 achew22 hey-- that's cool
# Aug 7th 2008, 04:44 achew22 is it possible to get it to log the value changes?
# Aug 7th 2008, 04:45 achew22 martz its in saved-bin it won't ever go away just go to bin.cakephp.org and search for alkemann logable
# Aug 7th 2008, 04:45 alkemann it'd be a bit complicated, it is an obvious step. But i was thinking maybe if u want that, its better to use the Versioning beahvior with shadowtables?
# Aug 7th 2008, 04:46 achew22 alkemann: you could do both, associate the log change with a shadowtable's element id
# Aug 7th 2008, 04:47 JeffEmbracedDC Martz: in your join table model... is in belongsTo or hasOne back associations?
# Aug 7th 2008, 04:47 alkemann be hard to make it totally general though, would have to be associated with the specific Version behavior i think
# Aug 7th 2008, 04:47 alkemann JeffEmbracedDC: belongsTo, since the key is in that model
# Aug 7th 2008, 04:48 JeffEmbracedDC alkemann: cool :)
# Aug 7th 2008, 04:48 achew22 alkemann: if you mixed versioning with logging with polymporphic you would be able to do it
# Aug 7th 2008, 04:48 achew22 not to make it complicated or anything
# Aug 7th 2008, 04:49 alkemann i will definitivly take a look at it
# Aug 7th 2008, 04:49 achew22 that would be a great addition I'd give you a hug if you did that
# Aug 7th 2008, 04:49 Martz JeffEmbracedDC: yeah, as alkemann said. Something like: User, Groups, GroupUsers. GroupUsers belongsTo User, Group. User hasMany GroupUsers. Group hasMany GroupUsers - and find more recursively
# Aug 7th 2008, 04:49 alkemann i love hugs! :P
# Aug 7th 2008, 04:50 achew22 get ready for some major hugs then -- right after I see that code ;)
# Aug 7th 2008, 04:50 alkemann ur using a versioning behavior now?
# Aug 7th 2008, 04:51 achew22 I know the book has one
# Aug 7th 2008, 04:51 achew22 ad7 would know
# Aug 7th 2008, 04:51 alkemann is the documentation in Logable too sparse?
# Aug 7th 2008, 04:52 achew22 if I turned it into a professor yes, but for me its just fine
# Aug 7th 2008, 04:52 alkemann im not in school anymore. its all about practical :P
# Aug 7th 2008, 04:52 achew22 ah but I live in the strange high paced dev world / slow paced higly documented educational world still
# Aug 7th 2008, 04:52 achew22 makes my head hurt
# Aug 7th 2008, 04:53 achew22 although sometimes I end up with work projects that are 30% comments which is always nice when I come back
# Aug 7th 2008, 04:53 alkemann heh, yea i wanna make someting, not learn to make something :P and i try to focus on readable code, vs. over documenting
# Aug 7th 2008, 04:53 achew22 alkemann: did you see the new thing the bot does when people get mad?
# Aug 7th 2008, 04:53 alkemann no. can u show it?
# Aug 7th 2008, 04:53 achew22 ACTION is mad at alkemann
# Aug 7th 2008, 04:54 achew22 lol
# Aug 7th 2008, 04:54 alkemann lol
# Aug 7th 2008, 04:54 alkemann HELP!!!
# Aug 7th 2008, 04:54 alkemann HELP!!!!
# Aug 7th 2008, 04:54 achew22 no -- its only catching when the line starts with !
# Aug 7th 2008, 04:54 alkemann ah ok
# Aug 7th 2008, 04:54 achew22 and I set up ~!! and ~!!!
# Aug 7th 2008, 04:55 achew22 so !!! also works
# Aug 7th 2008, 04:55 alkemann ah
# Aug 7th 2008, 04:55 achew22 oh cakebot, you don't know what's coming for you... your going to get a message queue soon
# Aug 7th 2008, 04:55 achew22 ACTION pets cakebot
# Aug 7th 2008, 04:55 alkemann cant find that version behavior. u got it?
# Aug 7th 2008, 04:56 achew22 it may not be public
# Aug 7th 2008, 04:56 achew22 ask AD7 or gwoo or one of the documentation guys
# Aug 7th 2008, 04:56 alkemann they are a bit strict on the bakery. i got an article that is unpublished as well
# Aug 7th 2008, 04:57 achew22 they are just falling behind its hard to moderate the bakery
# Aug 7th 2008, 04:57 achew22 hey... when did I join the documentation team http://cakeforge.org/projects/cakedocs/