mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
Say something if the template engine isn't available for theme
fixes #600
This commit is contained in:
parent
3e417e43df
commit
f5030681d7
1 changed files with 4 additions and 3 deletions
|
@ -24,9 +24,10 @@ BANNER
|
||||||
def copy_or_fetch #:nodoc:
|
def copy_or_fetch #:nodoc:
|
||||||
return copy_default_views if file_name == 'default'
|
return copy_default_views if file_name == 'default'
|
||||||
|
|
||||||
themes = self.class.themes
|
if theme = self.class.themes.detect {|t| t.name == file_name}
|
||||||
if theme = themes.detect {|t| t.name == file_name}
|
if download_templates(theme).empty?
|
||||||
download_templates theme
|
say %Q[template_engine: #{template_engine} is not available for theme: #{file_name}]
|
||||||
|
end
|
||||||
else
|
else
|
||||||
say %Q[no such theme: #{file_name}\n avaliable themes: #{themes.map(&:name).join ", "}]
|
say %Q[no such theme: #{file_name}\n avaliable themes: #{themes.map(&:name).join ", "}]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue