Class: MyTimeline::GithubController

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

Instance Method Summary collapse

Instance Method Details

#newObject



3
4
5
6
7
# File 'app/controllers/my_timeline/github_controller.rb', line 3

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

#scrapeObject



9
10
11
12
# File 'app/controllers/my_timeline/github_controller.rb', line 9

def scrape
  scrapey = MyTimeline::Github::GithubScraper.new(@user).scrape
  redirect_to :back, notice: "Added #{scrapey} gits."
end