#rubyonrails - Tue 27 Feb 2007 between 00:00 and 00:16

NY Lost Funds



dnitei spent a while trying to write my own thing and had something that worked OK like.. but i kept finding little things that didn't work right.. but then i found that first plugin i showed u and was able to modify it so it didn't use 2 rows per relationship and add whatever other methods i wanted in there and i was happy. x=)
slapahohehehe
am i right in my associations thought?
the 2 has many
a user can have many relatinships.user_id entries and also a user can have many relationships.friend_id entries
dniteu want has_many :friendships, :foreign_key => "user_id" and has_many :friendships, :foreign_key => "friend_id" .. ya..
erm.. that 2nd one has to be befriendships (or whatever u want to call it, that isn't friendships)
_3DStudioDoes anyone know what would cause observe_form to NOT fire off an ajax request when the form elements are changed?
dniteu can't call them both friendships, because u already have an association looking for friendships with a foreign key "user_id" so u have to call the 2nd association something different.. and then the next 2 associations u use will tie them both together with has_many :through
slapahoso what about calling them :relationship_users and :relationship_friends ?
i dont really care what i call them because i won't be using them
i'll write my own method to actually do the work
that cool? or a prob
pythonicslapaho: how 'bout :stalkers and :stalkees?
_3DStudiohere is a paste of my form_tag, its ouput.. then my observe_form and its output:
http://pastie.caboo.se/43277
slapahonice
_3DStudioanyone have any idea why the form observer doesn't fire the ajax request?
pythonicweb 2.0 sucks
AngryParsleyyeah, let's go back to asp
_3DStudiopythonic: well it sure does give me a headache :)
slapahook so this is what i came up with dnite, what do you think ofmy associations? http://pastie.caboo.se/43278
_3DStudioI've spent all day trying to figure out why this isn't working
slapaho(this doesn't show the FK links i have on the db itself)
baggendIf a view like 'new' is passed a parameter at the time that it's called, is it smart enough to pass on that parameter when I run 'create' or do I need to manually add a hidden field for it?
pythonic_3DStudio: i can think of better ways to pass the time
_3DStudioI have a periodically_call_remote on another page that works fine, so I know ajax in general is working
Akuma_whats the right way to override an attribute method?
dniteslapaho, looks like a great start
lonnyWith so many hanging around now, I should re-ask my earlier question: is Model.destroy supposed to return anything? Seems like it should, but it does not seem to.
pythonicslapaho: hack up schema_definitions.rb to add foreign key references.
Akuma_i.e. how am i supposed to access attributes
_3DStudiolonny: I don't think it returns anything useful
slapahopythonic, ok, thanks!
lonny_3DStudio: Yeah that's what I thought. What a waste.
slapahodnite, ok now for my what, Relationship.find method that you gave me?
dniteu could definately add that.
sky's the limit. x=)
_3DStudiowell I just tried my observe_form in firefox too and STILL the development.log shows nothing happens when I change the form fields
so it's not a safari problem

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 93 100 107 114 121 128 135 

IrcArchive

NY Lost Funds