Caleb Land
2010-May-31 18:44 UTC
[PATCH] Allowing attribute names with spaces and other characters (in AttributeMethods)
Hello, I opened a ticket with a patch that allows the use of spaces and other unconventional characters in attribute names in the AttributesMethod plugin in ActiveModel. This is a simple patch that changes dynamically generated methods from being defined with ''def'' to ''define_method'' and adds some quoting. The idea behind it is that it would allow those of use who use databases like couch (or mongo?) to utilize ActiveModel''s features without translating the attribute names to be ''def'' friendly. The other features like validations already work with fields with spaces, and the Dirty plugin works with this as well. I can''t think of any potential downsides to this patch, since it doesn''t change anything semantically. The ticket is here: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4725-allow-attribute-names-with-spaces-and-other-characters-patch#ticket-4725-3 What do you think of this idea? -- Caleb Land -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.