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.

Gaël Deest's latest activity

Tuesday, April 06 2010
4326 URL Generation for routes that point to a Rack application include the contro... was updated in Ruby on Rails
  • Gaël Deest
    Gaël Deest commented at 6:38 PM

    Hi, this might be related. Here is my controller:

        class MyControllerController < ApplicationController
          before_filter { |controller| render :text => c...
4325 Real scope support for ActiveRecord's uniqueness validation was updated in Ruby on Rails
  • Gaël Deest
    Gaël Deest commented at 4:06 PM

    The 'validates' line should have read:

        validates :name, :uniqueness => {:scope => :active}
    

    Also, I'm actually using class methods and not true 'scopes', b...

  • Gaël Deest
    Gaël Deest commented at 3:58 PM

    Here is a (trimmed down, but real life) example. I'm working on a project where my customers will have their own subdomains. Subdomains are represented by a sta...

Sunday, April 04 2010
4325 Real scope support for ActiveRecord's uniqueness validation was updated in Ruby on Rails
  • Gaël Deest
    Gaël Deest commented at 1:55 PM
  • Gaël Deest
    Gaël Deest created the ticket at 1:54 PM

    Hello,

    The 'scope' option of AR's uniqueness validation is quite confusing. Contrary to what one might expect, this option doesn't take a scope, but an (array o...

Thursday, March 18 2010
4222 Using form_for with ActiveResource broken in edge was updated in Ruby on Rails
  • Gaël Deest
    • Tag changed from activeresource, edge to activeresource, edge, patch
    by Gaël Deest at 10:33 PM

    Here is a cumulated patch for this issue and the one raised by ticket #4155.

    Please tell me if there is any problem with this patch.

  • Gaël Deest
    Gaël Deest commented at 8:09 PM

    Adding:

    def persisted?
      return !new?
    end
    

    to activeresource/lib/active_resource/base.rb does the trick. I don't know if it's safe to remove new_record? entire...

  • Gaël Deest
    Gaël Deest created the ticket at 6:08 PM

    After submitting a patch for ticket #4155 I realized that using form_for with a new instance of ActiveResource has actually been broken in edge since the follow...

4155 ActiveResource generates an error for a form_for attribute was updated in Ruby on Rails
  • Gaël Deest
    • Tag changed from 2, activeresource, patch to 2, 3.0.0.beta, activeresource, patch
    by Gaël Deest at 2:28 PM
  • Gaël Deest
    • Tag changed from 2, activeresource to 2, activeresource, patch
    by Gaël Deest at 2:25 PM

    Just made a patch to fix this. This patch makes it possible to use new active resources with form_for, using:

    Product.build

    instead of:

    Product.new

    Hope this he...