This project is archived and is in readonly mode.

#3940 ✓committed

Active record dynamic finder symbol gets converted to yaml

Reported by bterkuile | February 12th, 2010 @ 12:22 PM | in 3.0.2

When playing with aasm I was trying selectors like:
MyModel.find_all_by_state :active
This returns an empty result while:
MyModel.find_all_by_state 'active'
Returned the expected results.

SELECT * FROM "my_models" WHERE ("my_models"."state" = '--- :active')

This is for me unexpected behavior. I tracked the logic back to the file:

I cannot oversee the implications of doing stuff like:
class Symbol; alias to_yaml to_s; end

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=""></a>