title: Rails Change record values
body: <p>I have a record in postgresql of user status it is boolean and its attributes are "true" and "false". I want to show "true" as "active and "false" as "inactive". How do I do it with query or any thing to add in model.</p>
  
  <p>Controller:</p>
  
  <pre><code>     def index
       @users = User.reorder("id ASC").page(params[:page]).per_page(10)
       @count = 0
       end 
  </code></pre>
  
  <p>Model:</p>
  
  <pre><code>    class User &lt; ActiveRecord::Base
      has_many :orders
      has_many :order_statuses
  
       attr_accessible :first_name, :last_name, :email, :password,
    :password_confirmation, :code
  
       validates :first_name, presence: true
       validates :last_name, presence: true
       VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-]+(\.[a-z]+)*\.[a-z]+\z/i
        validates :email, presence: true, format: { with: VALID_EMAIL_REGEX },          uniqueness: { case_sensitive: false }
       validates :password, length: { minimum: 6}
  
      has_secure_password
      before_save { self.email = email.downcase }
       before_create :create_remember_token
  
      def User.new_remember_token
      SecureRandom.urlsafe_base64
      end
  
      def User.encrypt(token)
      Digest::SHA1.hexdigest(token.to_s)
      end
  
       private
  
       def create_remember_token
       self.remember_token = User.encrypt(User.new_remember_token)
        end
          end
  </code></pre>