make Wagn work with Rails 3

Ticket

+commit
 

 

 

 

Rails 3, Ruby 1.9