[Rails] Re: remove 1 HABTM association at a time

2009-09-17 Thread dinoD
b = B.first # Find the b you want to remove association to. a.bs.delete(b) From has_and_belongs_to_many doc: collection.delete(object, …) Removes one or more objects from the collection by removing their associations from the join table. thanks for the reply, unfortunately this deletes

[Rails] Re: remove 1 HABTM association at a time

2009-09-17 Thread dinoD
thanks for all the replies. just to clarify my intent, i am associating keywords with a set of documents, and the more times a keyword is associated with particular document, the more it is weighted as being relevant to that keyword, but it must be the exact same keyword, that's why i do this:

[Rails] Re: extract keywords from string

2009-08-23 Thread dinoD
Jeff- thanks for the reply. i can deal with context in a different method, in your solution, i still grab a and test. and wow* as keywords. i want to send this method a string, and get an array of letter-only words returned. if you have context ideas, i'd love to hear those too, but the first

[Rails] Re: select_tag with multiple set to true returns a String in params instead of array

2009-05-05 Thread dinoD
awesome, fixed. thanks fred. On May 5, 11:42 am, Frederick Cheung frederick.che...@gmail.com wrote: On May 5, 4:07 pm, dino d. dinodorr...@yahoo.com wrote: Hi - I'm trying to get a multi-select box working.  The form shows up fine, and I can select multiple items fine, but in the

[Rails] Re: Can RJS render new javascript?

2009-03-31 Thread dinoD
31, 4:54 am, Frederick Cheung frederick.che...@gmail.com wrote: On Mar 31, 4:12 am, dinoD dinodorr...@yahoo.com wrote: Thanks for the reply.  I'm writing the script code because i'm testing an example user of the widget, and it simply calls the website that generates the widget.  so

[Rails] Re: Can RJS render new javascript?

2009-03-31 Thread dinoD
Sorry for the dumb follow up, but can you do that in RJS (update an elements innerHTML directly) ? Thanks Fred, Dino On Mar 31, 11:15 am, Frederick Cheung frederick.che...@gmail.com wrote: On Mar 31, 4:03 pm, dinoD dinodorr...@yahoo.com wrote: Thanks Fred.  I see in the code that you're

[Rails] Re: Can RJS render new javascript?

2009-03-30 Thread dinoD
Thanks for the reply. I'm writing the script code because i'm testing an example user of the widget, and it simply calls the website that generates the widget. so is there some escaping type issue that would prevent directly rendering a script tag from RJS? On Mar 30, 9:39 pm, Phlip