Skip to content

Commit

Permalink
Show videos by language, Refs #33
Browse files Browse the repository at this point in the history
  • Loading branch information
nunulong committed May 25, 2016
1 parent 7fc669c commit 8cb349c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/controllers/videos_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ class VideosController < ApplicationController
# GET /videos
# GET /videos.json
def index
@videos = Video.all

if I18n.locale.to_s == "en"
@videos = Video.where(video_type: "Youtube")
elsif I18n.locale.to_s == "zh-CN"
@videos = Video.where(video_type: "Youku")
end
end

# GET /videos/1
Expand Down

0 comments on commit 8cb349c

Please sign in to comment.