title: On/off subscription attribute for rails
body: <p>I currently have an app that can sign up a new subscriber. When they sign up the user is subscribed for one year, I want to make a way of saying "if the year is up your subscription is now turned off until renewal". I recently added a attribute to subscriber called <code>status</code> and I set it to a string. My thought is that I could make a if/else statement that would condition either on or off for the subscriber but I'm not sure if that's the best idea? My question is - What is the best way to handle a case like this? I'll post some code for clarity. </p>
  
  <p>CONTROLLER:</p>
  
  <pre><code>   class SubscribersController &lt; ApplicationController
    helper_method :sort_column, :sort_direction
  
    def index
      @search = Subscriber.search(params[:q])
      @subscriber = @search.result
      @search.build_condition if @search.conditions.empty?
      @search.build_sort if @search.sorts.empty?
    end
  
    def new
      @subscriber = Subscriber.new
    end
  
    def create
      @subscriber = Subscriber.create(subscriber_params)
      if @subscriber.save
        flash[:notice] = "Subscriber Has Been Successfully Created"
        redirect_to new_subscriber_path(:subscriber)
      else
        render "new"
      end
    end
  </code></pre>
  
  <p>SCHEMA:</p>
  
  <pre><code>    create_table "subscribers", force: :cascade do |t|
      t.string   "first_name"
      t.string   "last_name"
      t.string   "email"
      t.string   "phone_number"
      t.datetime "created_at",   null: false
      t.datetime "updated_at",   null: false
      t.integer  "visit"
      t.integer  "mug_number"
      t.string   "status"
    end
  </code></pre>
  
  <p>As you can see everything is pretty basic. I'm just looking mainly for advice on how to handle this situation. any help would be great thanks!</p>