To_json failing with column named test


I have a model with a column named test, which causes trouble to

The problems comes from this line

serializable_names.each { |name| serializable_record[name] =
@record.send(name) }

and more specifically the call to send with the column name passed as
argument. The problem comes from the fact that test is an already
defined private method, which is then called rather than the expected

I’ve tested it with this code

serializable_names.each { |name| serializable_record[name] =
@record[name] }

and it works fine, but no accessor would be used then.

Anyone having a suggestion for a solution?



Web database:
Free Software Developers Meeting:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs