My rails application is wired up to a legacy database and there's a column with a space in it. I created an alias_attribute and that lets me access said field, but if I try to access a field that's defined afterwards, I get a syntax error. How do I tell rails to only use the alias_attribute and ignore the field with a space?
class Atg < ActiveRecord::Base
alias_attribute :modified_ts, :'Modified TS'
end
=> #<Atg primary_shot: nil, product_id: "1000000007", category_number: nil, vm_ready: nil, Modified TS: "2014-02-28 07:31:40", size_code: "NS1003715">
error I'm getting if I try to retrieve the size_code:
/home/action/.rvm/gems/ruby-2.1.1/gems/activerecord-4.1.0/lib/active_record/attribute_methods/time_zone_conversion.rb:36: formal argument cannot be a constant def Modified TS=(time)