Class: MyTimeline::TwitterController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/my_timeline/twitter_controller.rb

Instance Method Summary collapse

Instance Method Details

#newObject



4
5
6
7
8
# File 'app/controllers/my_timeline/twitter_controller.rb', line 4

def new
  @user.settings(:twitter).user_name = params[:user_name]
  @user.save!
  redirect_to control_panel_path, notice: "Twitter added!"
end

#scrapeObject



10
11
12
13
# File 'app/controllers/my_timeline/twitter_controller.rb', line 10

def scrape
  scrapey = MyTimeline::Twitter::TweetScraper.new(@user).scrape
  redirect_to :back, notice: "Added #{scrapey} tweets."
end