#rubyonrails - Wed 18 Apr 2007 between 01:28 and 01:43

NY Lost Funds



macographereheh..
dwilkinsYes
cschneiddoes rails support mysql enum columns, or should I do it all in code with an integer column?
macographerheinous: have you tried to do anything yet?
eydaimondwilkins: http://pastie.caboo.se/54570
hoganbphey what's up all?
heinousmacographer: I was just about to try seeing if it would take personal_info.blah for the method in the form helper
hoganbpheinous: you can't use form helpers for those type of relationships
heinoushoganbp: ah, that is what I was afraid of, it just seemed like it would be so nice
hoganbpheinous: it's actually not terribly bad.....
dwilkinseydaimon: if you take out the initialize method - does it work?
macographerheinous: you've got a form to edit a @user object?
eydaimondwilkins: will try. one sec
hoganbpheinous: her's what you do
heinousmacographer: yup, and part of the form is to update a table that is linked to the user's table w/ one-to-one relationship
hoganbpheinous: load personal_info into @personal_info and then use it with the helper
eydaimondwilkins: ah. it appears to now
dwilkinseydaimon: I don't think you can create an object without sending in your "data"
eydaimondwilkins: and that's why it complains about nil data
dwilkins: thanks much
dwilkinseydaimon: y/w (Many eyes make all bugs shallow)
heinoushoganbp: can you give an example of what the text_field helper would look like assuming I had a @personal_info for the user's controller with the user.personal_info stuff in it?
hoganbpheinous: in the controller you have @user and then @personal_info = user.personal_info
heinous: then just do <%=text_field "personal_info", "blah" %>
heinoushoganbp: thanks
hoganbpheinous: when you get it back, params[:user] contains your user fields, and params[:personal_info][:blah] contains that extra field
heinous: you'll need to do the assignment yourself in the controller of course... @personal_info = @user.personal.info @personal.info.update_attributes(params[:personal_info] etc
lonnydwilkins: Sounds like an ancient Chinese programming proverb.
dwilkinslonny: I think that Eric Raymond said it.
macographerwhy can't i add a style attribute to a link_to_remote tag?
hoganbpmacographer: look carefully at the api and make sure you're putting it in the right hash parameter
hatezillaheh
macographeri've tried everything i can think of, using the api as a reference.
hatezillashouldnt it be japanese, since ruby is .jp in origin
:p
dwilkinshatezilla, lonny: There was a book once called "The Zen of Programming" - funny
macographerhrm.. maybe :html_options => {} instead of :html => {}
hoganbpmacographer: no....
lonnydwilkins: And then there is Rudy Rucker: "Insufficient operator headspace."
dwilkins: Those common IOH problems...

Page: 1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106 113 120 

IrcArchive

NY Lost Funds