view app/controllers/tweets_controller.rb @ 50:3f419d621b06

Rename config option. Changed in rails 4.2.
author nanaya <me@myconan.net>
date Thu, 23 Apr 2015 16:30:47 +0900
parents 8983c426e256
children 8f68ca606099
line wrap: on
line source

class TweetsController < ApplicationController
  def index
  end

  def show
    client = Tweet.new(params[:id])
    @tweets = client.timeline
    @user = client.user
  rescue Twitter::Error::NotFound
    head :not_found
  rescue Twitter::Error::Unauthorized
    head :forbidden
  end
end