title: Alias for column names in Rails
body: <p>In my database has column names such as 'delete' or 'listen-control' and so on. These cannot be changed, so I would like to alias the names so as to avoid problems in my application.</p>
  
  <p>I found <a href="http://snippets.dzone.com/posts/show/556" rel="noreferrer">the following code</a> but it is outdated (05 Aug 2005) and doesn't work with Rails 3:</p>
  
  <pre><code>module Legacy
    def self.append_features(base)
      super
      base.extend(ClassMethods)
    end
    module ClassMethods
      def alias_column(options)
        options.each do |new_name, old_name|
          self.send(:define_method, new_name) { self.send(old_name) }
          self.send(:define_method, "#{new_name}=") { |value| self.send("#{old_name}=", value) }
        end
      end
    end
  end
  
  ActiveRecord::Base.class_eval do
    include Legacy
  end
  </code></pre>
  
  <p>How can I alias the column names? Is it possible?</p>