similar to: shouldn''t this work? - session[:array_of_objects].delete_if {|x| x.id == params[:id]}

Displaying 20 results from an estimated 1000 matches similar to: "shouldn''t this work? - session[:array_of_objects].delete_if {|x| x.id == params[:id]}"

2006 Jan 06
10
I need debugging tips?
Hi all, Like most other frameworks, Ruby groups code by Model/View/Controller instead of by task, and therefore I''m having a hard time debugging a problem from the Agile Rails book where looping through @items errors out because one or more items is nil. I managed to empty the cart by placing session[:cart] = nil in find_cart() in the store_controller_rb, and the problem continued
2006 Apr 06
16
Rails Masters'' debugging techniques -> Rails Recipes?
Hi, This msg for Chad Fowler or anyone who fits the subject line. I bought the Recipes book and really like the way it has been progressing. There is one subject I''d like to see explored in detail. Having come from Assembly and C background I find that a ''must have'' tool in your collection is the debugger. I find debugging a Rails App the most thorny issue inversely
2006 May 19
6
rmagick->X11 on MacTel Howto?
I needed to install rmagick/GraphicsMagick on an IntelMac and did so from Darwinports. Some things work and others don''t work, like rendering fonts which needs X11 fonts and X server. The rmagick page at rubyforge points to .. http://developer.apple.com/opensource/tools/runningx11.html where X11 link to Apple is broken. X11User.pkg talked about on the page above no longer exists at
2006 May 16
7
svn-1.3.1 errors on intel mac on checkout
I just installed svn-1.3.1 from .dmg on an intel mac. I am getting ... subversion/libsvn_wc/log.c:338: (apr_err=155009) svn: In directory ''sr'' subversion/libsvn_subr/io.c:565: (apr_err=2) svn: Can''t copy ''sr/.svn/tmp/text-base/README.svn-base'' to ''sr/README.tmp'': No such file or directory Any one getting this? TIA for any help.
2006 Mar 16
21
RadRails 0.6 out
Since RadRails 0.6 is out (see http://www.radrails.org/ ), I have made a "celebratory illustrated tutorial" on how to use the Eclipse update function to do the upgrade from within Eclipse (I found the process a tad confusing): http://wiki.awebfactory.com.ar/awebfactory/published/UpdateRadRails saludos, Victor Kane awebfactory.com.ar -------------- next part -------------- An HTML
2006 Jan 10
7
Can only render or redirect once per action - why?
I ran into this error message a quite a few times since my app requires branching to different pages from the same action... say using a switch statement. Ofcourse I found that you can use multiple redirects or renders if you do render :action => ''new'' and return false I hate to code something I don''t understand fully. Any explanation of this will be greatly
2006 Apr 21
28
Ruby, Rails & Linux - Which distro ??
Hi, I''ve been doing most of my initial playing with rails on a windows system - but wish to switch to a dedicated linux box for this. Are there any particular distro''s to avoid / recommend. I prefer debian for my other stuff, but thought i''d ask before going ahead. :) Cheers -- Posted via http://www.ruby-forum.com/.
2006 Mar 09
6
rmagick and captcha
Has anyone implemented a captcha with ruby on rails and rmagick? I tried this example: http://wiki.rubyonrails.com/rails/pages/HowtoSecureFormsWithNoisyImages but I got an error: undefined method `size'' for #<NoisyImage:0x34d8070> Thank you -------------------------------------------------- Rodrigo Dominguez ? Iplan Networks ???????????????Datos Personales
2006 Apr 12
5
SPAM on rails-list
This is a high traffic list as it is and it is really annoying to see that SPAM is on the rise here. I wonder how they can spam the list since each user has to be authenticated. Do spammers go through the trouble of subscribing to the list? In any case, this msg is to the list admin...could you please do whatever it takes to filter this stuff out? Thank you very much. -bakki
2006 Jun 16
5
[slightly OT] Problem with subversion 1.3.1 on OSX Tiger
I have a subversion repo on a Debian Sarge server. I do rails development on two Debian workstations (home, work) and also a MacBookPro. I installed subversion from Darwinports. Things worked ok for a while and I did commits from and updates to all three machines until today. When I did svn status I noticed a lock on the working dir. $ svn status ? Rakefile ? readme ! L . .... etc I cannot
2006 Jan 24
2
Security Code for protecting forms?
Hi all What''s the easiest way to protect my forms using a security code? Is there any plugin available for this? Thanks a lot. :-) Josh -- Posted via http://www.ruby-forum.com/.
2006 Jun 28
15
Its here! RubyGems Release 0.9.0
Read about it here: http://rubyforge.org/forum/forum.php?forum_id=7575 -- Posted via http://www.ruby-forum.com/.
2006 Apr 23
4
Ruby, Rails & Linux - Which distro
Did I sound like our President? :) <spin> I didn''t explain myself well. I am not thinking of buying the identically equipped PC laptop either at the same price. If I had a $2500-$3000 budget (laptop, Applecare + case etc) I might consider the Mac, but then in the PC laptop universe there are more options of going with the slower processors (T2300 or T2400) for about $1,000 less
2007 Sep 17
2
Drb - shared app with multiple private databases - howto?
Hello, I''ve been trying to get my head around ferret and the one thing that stumps me is how I might use Drb on a dedicated server with multiple clients using the SAME application but each with their own private database and other file assets (in an uploads directory within the app) Thank you for any suggestions, pointer etc. Also I''d be very interested in hearing from those
2009 Feb 04
2
delete_if does not work on associations
I tried to user delete_if on an association: class Group < ActiveRecord::Base has_many :memberships, :dependent => :destroy has_many :users, :through => :memberships ... end This is the controller method, trying to use delete_if. Although some elements are removed (s2 < s1), the save method does not update the association. def intersect_or_remove_group other_group =
2006 Jan 09
11
Fast Ruby Debugger?
After developing in Java for years in IDEs I''m starving for a decent ruby debugger. When learning new codebasesI find it invaluable to use the debugger to step through the system and see how things work at runtime. Using RDT in Eclipse is fine but it''s excruciating to wait minutes for the default debugger to finally reach my breakpoints on tests that normally take seconds to
2006 Sep 25
2
@article.article_groups.delete_if... Dosn't work!
If I try: @article.article_groups.delete_if {|x| x.group_id == x.group_id } It does nothing. If I try: articletmp.article_groups.each{ |x| @article.article_groups.delete(y) } It deletes some of the groups. @article.article_groups.clear works. Why dosn''t the to first examples work as expected?? Do I have to put groups I don''t want to
2006 Aug 08
12
delete_if doesn''t work for has_and_belongs_to_many
I''m using Rails-1.1.4 with Ruby-1.8.4 So let''s say I have 2 model classes: class Item has_and_belongs_to_many :things end class Thing has_and_belongs_to_many :items end i = Item.new i.things << Thing.new( :value => "Something").save i.things << Thing.new( :value => "Something Else" ).save i.save Fine, now I have two records in the
2006 May 13
8
Which Linux flavor for a Rails server?
Hi folks, I''m a linux noob, and I''m trying to pick a distro for my rails server. I don''t want to start a flame-war about linux distros! I''m interested in the best distribution for these criteria: 1 - Simplicity of getting ruby and rails set-up (gem updates) 2 - Stability (it is a server, after all) 3 - Support resources (community, and as a fall-back, paid
2007 Jun 19
1
fastthread errors on Debian Etch
Hi all, I am strangely getting errors on Debian Etch on a Intel server though I had done an identical install of mongrel-1.0.1 on an amd64 version of Etch. While building fastthreads I get: ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) ERROR: Failed to build gem native extension. ruby extconf.rb install mongrel creating Makefile make gcc -I.