Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Peter Marklund's latest activity

Tuesday, June 15 2010
1367 [PATCH] Add a NullStore to ActiveSupport::Cache was updated in Ruby on Rails
  • Peter Marklund
    Peter Marklund commented at 3:32 PM

    I like this patch as it enabled global disabling of the cache. To me it would make sense to have an enabled attribute on the Rails.cache object, something I ach...

Tuesday, September 08 2009
3142 Make select options in forms symbol/string indifferent was updated in Ruby on Rails
  • Peter Marklund
    Peter Marklund commented at 11:07 PM

    I don't really see a practical risk of backwards incompatibility in this change. Can someone please show me a use case that breaks?

    Yes, you are right Michael, ...

  • Peter Marklund
    Peter Marklund commented at 12:38 AM

    Matt,
    there reason I checked for Enumerable was because I needed to use the map method. It seems reasonable to require that if you want to select multiple value...

Monday, September 07 2009
3142 Make select options in forms symbol/string indifferent was updated in Ruby on Rails
  • Peter Marklund
    Peter Marklund commented at 9:49 AM

    Actually a more common use case for running into this issue is that the option values in the select are ActiveRecord integer ids. What's wrong with this code?

    ...
Sunday, September 06 2009
3142 Make select options in forms symbol/string indifferent was updated in Ruby on Rails
  • Peter Marklund
    Peter Marklund commented at 8:37 AM

    It's probably unusual that you have anything other than strings or symbols as options, but if you do, it seams reasonable that the objects that you use have a s...

Friday, September 04 2009
3142 Make select options in forms symbol/string indifferent was updated in Ruby on Rails
  • Peter Marklund
    Peter Marklund commented at 7:02 AM

    Added tests for when the selection or one of the options is nil.

Thursday, September 03 2009
3142 Make select options in forms select on string equality instead of object equa... was created in Ruby on Rails
  • Peter Marklund
    Peter Marklund created the ticket at 11:56 PM

    A gotcha I've run into a number of times is that my options array for a select box will be integers or symbols but the param to select an option will be a strin...

Thursday, June 11 2009
2789 Make Rake task db:schema:load compatible with SQL schema format was created in Ruby on Rails
  • Peter Marklund
    Peter Marklund created the ticket at 1:36 PM

    If you in your environment.rb have set "config.active_record.schema_format = :sql" then the Rake task db:schema:load (and the upcoming db:setup task in Rails 3 ...

Thursday, May 14 2009
2543 Make ActiveRecord::Base.exists? invoke find_initial to support :include scopes was updated in Ruby on Rails
  • Peter Marklund
    Peter Marklund commented at 8:35 AM

    Hi Michael!
    I agree with you that the find_initial approach seems like the best at this point. I've attached a patch file.

    Thanks!

    Peter

Sunday, May 10 2009
2543 Make ActiveRecord::Base.exists? invoke find_initial to support :include scopes was updated in Ruby on Rails
  • Peter Marklund
    Peter Marklund commented at 9:44 PM

    Just to clarify, the implementation of exists? from my original patch looked like this:

    def exists?(id_or_conditions = {})
      find_initial(
        :select => "#{qu...