search for: rabbitblue

Displaying 13 results from an estimated 13 matches for "rabbitblue".

2006 Jul 18
8
Including files from lib/
I asked about this a few days ago and got no replies, so I''m asking again. I have a file called string_extensions.rb. In it, I extend the String class to include some extra functionality. I put this file into the lib/ directory of my app. But the changes made to String don''t take effect. The program acts as though the files aren''t being included. I''ve stopped
2005 Dec 28
8
Rails app lags after inactivity
Hi all. I have two Rails applications. Each is on its own VPS hosted by Pipespring (excellent service btw). My app runs lightning quick - AFTER the first load. If I visit my site after a period of inactivity (i.e. no visitors to my site), it takes up to 10 seconds to load that first time. After that I can hop around with no problems. Has anyone run into this before? Ideas? - Rabbit
2006 Jan 26
1
Action variables not available in views with Ajax
The title pretty much describes my problem. I have a standard Ajax call to an action the updates a portion of my view. However, variables set inside the action are not available in my view. In fact, NOTHING that happens in my action seems to affect my view. Calling render :layout => false still gives me the flipping layout. However, I know the Ajax call itself is working because I can do
2006 Jan 25
1
Routes working with subdirectories repeat subdirectory...
Hi all. Views associated with admin controllers must always specify both :controller and :action when using link_to. Example: <%= link_to ''Edit'', { :controller => ''/raid_manager'', :action => ''edit_raid_template'', :id => raid_template.id } %> The above is being called from within the Admin::RaidManagerController. The
2006 Jan 28
13
What''s the verb form of id?
Random question: I''ve written a method for the String class that turns an arbitrary line of text in to an identifier, e.g.: "My, what a beautiful day!" => "my_what_a_beautiful_day" "(anb*#NF(AMNV" => "anb_NF_AMNV" We''ve got all these great names already like underscore, classify, titleize and things like that. I''d
2006 Jan 21
4
Ruby processes consuming 1,000 megs of swap space
Hi all. The subject pretty much says it. I''m running on a VPS-style shared server at pipespring.com. I''ve got Typo setup, and have been running it fine for about a month. However, today I got an e-mail from my host saying they disabled Ruby (chmod 000) because it was using waaay too much swap space. I haven''t changed anything with my server at all (Rails or otherwise)
2006 Aug 01
8
Dumb views?
Hello again! I''ve another "what would you do in this situation" question. You''ve got 6 controllers, one named base. The other 5 controllers extend base. Currently they share one layout. Your layout displays navigation. However, there are two actions inside base for which you do not want navigation displayed (index, new). Do you... a) Add logic to your layout telling
2006 Feb 11
16
Why does''nt rails pick up more metadata from a mysql schema?
Hi, when I define a db column to be non-nullable or of length 20 or as numeric, I would expect rails to validate that, but that doesn''t seem to be the case. Any idea why that is? The metadata is accessible, at least in the mysql case. I am using rails 1.0 with mysql 5. Cheers, Mariano
2006 Aug 16
1
Active Record Observers causing 404''s and other weird issues
Hi all. I''ve got a simple AR Observer: class NewOrderObserver < ActiveRecord::Observer observe NewOrder def after_create(object) Note.create(...) end end In environment.rb I have the following line: config.active_record.observers = :new_order_observer And in application.rb I have: NewOrderObserver.instance Aside from simply not working, it''s causing
2006 Jul 07
0
lib/ directory not working?
Hello all. I''ve got a file inside my lib directory called time_helper.rb. In it I open the Time class and add a method to it. When I hop into the console and try to use my new command, I''m told the method doesn''t exist. Any ideas? - Rabbit -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Jan 08
2
ICONV and REXML
Hi all. I''m having trouble getting REXML to play nicely with an RSS feed that uses an encoding type called WINDOWS-1250. My application works when I comment out the references to the lines that utilize the REXML library. After visiting my app and being told that Rails could not start properly, my server.log file says: FastCGI: comm with server
2006 Aug 02
0
Simply RESTful deletion
Evening all! I''m playing around with the new Simply RESTful plugin, and I''ve got a question about the *_url methods. >From what I understand, given a Page model, there are three _url methods provided: - page_url - new_page_url - edit_page_url I''m a bit disturbed that there are only three, but that aside... To delete a resource, I would say:
2006 Jul 24
8
Views in one controller reaching out to other controllers (best practices)
Hello all. For the purpose of my question, let''s imagine we''re building some search functionality. You''re a sales person (you poor sap). And you''re hanging out in the SalesCenterController. You need to do a search for available productions; you''ve decided to be cool and use Ajax. Do you... a) Make a remote call to an action in your current controller