#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
Top Prev 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 Next
#rubyonrails
<opus_> yuck
<Zycon> opus_: i've heard it's pretty good, but i haven't personally learnt it, so I can't comment
<sysconfig> What I want someone to do it click an "Add New Contact" link on an account page and up pops a screen that allows me to fill out a bunch of information about the contact. Upon submitting that form, I want to update an <DIV> Area of the original account page with only the First and Last name of the original contact.
<blinton> hi
<ndru1234> hi can someone advise? i have setup my model with user has_many :comments. is there a simple way to find the number of users who have 3 or more comments?
<sysconfig> Django is pretty cool but seem to be targeted more at content publishers. Its roots are in the newspaper business. It appears to pre-suppose that you know all of the fields of data that you will be publishing from the start.
<sysconfig> That was my perception of it anyway. I tried this with it, but need to incrementally add fields.
<sysconfig> RoR rocks for that.
<technoweenie> ndru1234: i usually cache that info
<hatezilla> anyone set up a field before that's an id but based on something like account id?
<hatezilla> just wondering if theres a more simple way to do it im unaware of
<opus_> sysconfig: try reload the entire page.. :)
<technoweenie> Comment belongs_to :user, :counter_cache => true # saved to User#comments_count
<Zycon> hey if i want to make a public static variable all i should have to do is @@whatever = 'bla' in my model and attr_reader :whatever ?
<hatezilla> so in a table, it has a made up id field that auto-inc's based on account...each account starts at 0
<Zycon> because at the moment MyModel.whatever is throwing an error
<technoweenie> hatezilla: yea
<technoweenie> you could probably use acts_as_list for that actually
<hatezilla> hrm
<technoweenie> otherwise... self.number = account.items.max(:number)+1
<hatezilla> yea
<technoweenie> self.number = account.items.max(:number).to_i+1
<hatezilla> whats max?
<technoweenie> #to_i so it converts nil to 0
<technoweenie> its a calculation method
<technoweenie> select max(number)
<technoweenie> maximum
<technoweenie> sheesh, i even wrote the fucking code :)
<sysconfig> I know that you are kidding, but, as workaround, I have actually put a "Refresh" link_to_remote right next to my select box that updates it after I have popped and submitted my new option.
<technoweenie> http://rails.rubyonrails.org/classes/ActiveRecord/Calculations/ClassMethods.html
<hatezilla> :)
<technoweenie> just looked, that's the exact code i have in my app
<hatezilla> thanks...
<hatezilla> i knew there had to be a rails way to go about it
<sysconfig> The user has to click on the "Refresh" link manually though and it still does not address making it the selected item.
<opus_> make some javascript that refreshes it on a callback.
<sysconfig> Maybe I do not understand the way a callback would work but it seems that the only place that I could use that is on the "Add Contact" link_to_remote and I am pretty sure that it is going to return as completed as soon as the new form is popped.
<mrkris> anyone here play D&D or any other roleplaying game?
<mrkris> http://youtube.com/watch?v=KkgeBjpdpbQ
<mrkris> cracks me up every time
<ChugChug> hello, all! what happened with the apple "feb 20" event?
<RadarListener> I'm trying to add an object to a queue like this:
<RadarListener> Effect.DropOut('comment-number', {queue: {position:'first', scope: 'comments'}})
<RadarListener> But it triggers the function, why?
<valehru> anyone here know if I can get radrails to auto refresh the files when they change in a folder? i.e. when I create a new controller or Model in the console, then radrails should automatically update that there are new files in the folder without me having to refresh each time?
<ndru1234> technoweenie: hey, thx. i've setup up caching as u have mentioned. now how do i get the number of users who have 3 or more comments? it seems like comments_count remains at 0 in the table, although the size method gives the correct number...
<magic_hat> anybody know of a ruby/rails-friendly way to grab a thumbnail of a quicktime movie?
<valehru> never mind, found out how to do it...
<kain> magic_hat: use ffmpeg
<magic_hat> kain: cool... does it have a ruby interface?
Previous Page Next Page