Copy and paste this code into your terminal
DISCLAIMER: You should always review templates before running them. By running the template, you are agreeing to the terms of use.
The contents of this script as show. Any updates will be reflected in the below code and the snippet.
def puts_green(heredoc)
puts set_color heredoc, :green
end
def ask_with_default(prompt, default)
value = ask("#{prompt} [#{default}]")
value.blank? ? default : value
end
gem 'kaminari'
run 'bundle install'
generate "kaminari:config"
if yes?("Do you want to generate the views?")
puts_green("Available Views:")
puts_green("default")
puts_green("bootstrap2")
puts_green("bootstrap3")
puts_green("bootstrap4")
puts_green("bourbon")
puts_green("bulma")
puts_green("foundation")
puts_green("foundation5")
puts_green("github")
puts_green("google")
puts_green("materialize")
puts_green("purecss")
puts_green("semantic_ui")
view = ask_with_default("Which view do you want to generate?", "default")
generate "kaminari:views", view
end
A place where you can thank the author, post problems, give constructive feedback, etc. Be nice!