mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
beginrescueend
This commit is contained in:
parent
899a04dd96
commit
c0a1b9c7db
1 changed files with 4 additions and 6 deletions
|
@ -35,13 +35,11 @@ BANNER
|
|||
|
||||
private
|
||||
def self.themes
|
||||
begin
|
||||
@themes ||= GitHubApiHelper.get_files_in_master.group_by {|fn, _| fn[0...(fn.index('/') || 0)]}.delete_if {|fn, _| fn.blank?}.map do |name, files|
|
||||
Theme.new name, files
|
||||
end
|
||||
rescue SocketError
|
||||
[]
|
||||
@themes ||= GitHubApiHelper.get_files_in_master.group_by {|fn, _| fn[0...(fn.index('/') || 0)]}.delete_if {|fn, _| fn.blank?}.map do |name, files|
|
||||
Theme.new name, files
|
||||
end
|
||||
rescue SocketError
|
||||
[]
|
||||
end
|
||||
|
||||
def download_templates(theme)
|
||||
|
|
Loading…
Reference in a new issue