Displaying 2 results from an estimated 2 matches for "to_options".
Did you mean:
  no_options
  
2006 May 14
0
Beware of HashWithIndifferentAccess#symbolize_keys!
Hi,
I just posted a patch tot he rails trac for a bug we found where
running symbolize_keys! on a HashWithIndifferentAccess will delete all
items from the hash. Please make sure you either never call
symbolize_keys! (or to_options! which just alias it) on a
HashWithIndifferentAccess, or apply the path attached from the ticket
at: http://dev.rubyonrails.org/ticket/5076
I also posted a much longer explanation in my blog at:
http://devblog.famundo.com/articles/2006/05/13/beware-of-hashwithindifferentaccess-symbolize_keys
Plea...
2007 Dec 06
1
Fetcher Daemon Questions - receive???
...arting to play with Slantwise.com''s Fetcher to process emails via
a Ruby script.
Here''s the basic code lifted from their plugin:
[code]
class MailFetcherDaemon < Daemon::Base
  @config = YAML.load_file("#{RAILS_ROOT}/config/mail.yml")
  @config = @config[RAILS_ENV].to_options
  @sleep_time = @config.delete(:sleep_time) || 10
  def self.start
    puts "Starting MailFetcherDaemon"
    # Add your own receiver object below
    @fetcher = Fetcher.create({:receiver => nil}.merge(@config))
    loop do
      puts "checking mail"
      @fetcher.fetch...