This project is archived and is in readonly mode.

#5500 ✓resolved
Jason May

arel_table.as("xxx") throws nil

Reported by Jason May | August 30th, 2010 @ 08:01 PM

Rails 3.0.0 general release.

Given an ActiveRecord class Foo:

Foo.arel_table.as("bar")

throws

NoMethodError: undefined method merge' for nil:NilClass

    from /Users/jmay/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/whiny_nil.rb:48:in `method_missing'
    from /Users/jmay/.rvm/gems/ruby-1.9.2-p0/gems/arel-1.0.1/lib/arel/engines/sql/relations/table.rb:54:in `as'

It appears that options is not being defaulted to {} in table.rb.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages