#apache #archlinux #asterisk #centos #debian #gentoo #haskell #kde #kubuntu #lisp #math #mysql #perl #python #ruby-lang #rubyonrails #suse #ubuntu #vim #wikipedia 0 1 2 3 4 5 6 7 8 9 10 11
Top Prev 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 Next
#rubyonrails
<tavilach> hrm?
<victori> well I placed foreign key constraints
<victori> I don't want it to error out, and isn't AR smart enough?
<victori> class::dbix, hibernate, toplink are all smart enough to handle FKs
<victori> well coded correctly to handle it
<pstickne> AR has an option on what do to...
<Skiz> victori: you will need to rescue the ActiveRecord::OMFGContraintFailure
<Skiz> or whatever its called ;)
<victori> Skiz: thats so bad
<jstew> victori: :dependent => :destroy
<victori> doing a rescue block, for something that should of deleted it by FK constraint
<pstickne> victori, it was a joke....
<victori> /no e-sarcasm detector
<pstickne> victori, if you started with reading up on the API like I suggested you could have found the option jstew just told you by yourself ^^
<bennyw> what is this api you speak of?
<pstickne> victori, but note that AR has a different notion of 'delete' and 'destroy' it's good it familiarize yourself with how the terms are used
<pstickne> api.rubyonrails.com
<Skiz> http://api.rubyonrails.org
<victori> pstickne: oh well I am done with rails personally, this is my last project, I am just supporting what has been made
<kain> there's some sort of orderby plugin? I mean, we have paginator plugin, but what if I can sort by a value in an html table?
<kain> s/can/want
<kain> you know, click on title and you get the table orderder by title asc or desc
<tavilach> bah jstew, im trying to use the in_place_editor thing but i dont see any good documentation as to how to use it
<eghjaytee> hello
<bentlegen> hey guys - how do i run rails core tests?
<wilfordbrimley> Skiz: i'm wondering how hard it would be to make it poly on the subject in addition to the object... so both a user and an object representing a group of users could favorite something..
<bentlegen> do i have to run each lib separately?
<eghjaytee> Is there a way to submit a form, but just have it submit a new uri? An example would be submitting a form that would load the following page: /images/search/term, where term has been submitted through the form
<eghjaytee> I feel like I am missing something
<eghjaytee> simple
<Skiz> wilfordbrimley: it really ends up not being very optimal, you may check out my preference plugin
<Skiz> current_user.has_favorite @venue
<Skiz> well lemme c
<Skiz> its more of a X has Y for Z
<victori> dpes AR do eager loading?
<AnalogHole> yes
<victori> anything special I need to declare?
<wilfordbrimley> Skiz: ok i'll check out the preference plugin too..
<AnalogHole> victori: nope, just add :include to your find.
<AnalogHole> ;include => [:someassociated, :model]
<tavilach> guys: im trying to use in_place_editor
<tavilach> here is what i do:
<tavilach> inside my joke list, i have: <%= in_place_editor_field "joke", "body" %>
<tavilach> at the top of my joke controoler, i have: in_place_edit_for :joke, :body
<tavilach> buit i ssee now javascript happening or anything
<tavilach> its all static
<tavilach> whats going on?
<joevandyk> tavilach: are you including the javascript libraries
<joevandyk> ?
<tavilach> no
Previous Page Next Page