class MedController < WithCatalogueSectionsController

  def index
    @from = Time.new(params[:from][:year], params[:from][:month]) rescue Time.now
    @med_items = MedItem.visible_to_user.select([:id, :title, :description, :published_at]).where("published_at <= ?", @from.since(2.month)).page(params[:page])
  end

  def show
    @med_item = MedItem.visible_to_user.find(params[:id])
  end

end
