Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

improve 'views' recipes so Devise forms use SimpleForm when selected

  • Loading branch information...
commit b41b2091831e3bc274f21fc6e0d17922add2bdce 1 parent 79c3ac9
@DanielKehoe DanielKehoe authored
Showing with 23 additions and 4 deletions.
  1. +5 −0 CHANGELOG.textile
  2. +7 −1 recipes/railsapps.rb
  3. +11 −3 recipes/views.rb
View
5 CHANGELOG.textile
@@ -1,5 +1,10 @@
h1. CHANGELOG
+h2. 2.2.13 unreleased
+
+* improve 'views' recipes so Devise forms use SimpleForm when selected
+* improve 'railsapps' recipes to use 'quiet_assets'
+
h2. 2.2.12 October 6, 2012
* add MiniTest to testing options
View
8 recipes/railsapps.rb
@@ -24,6 +24,7 @@
prefs[:authorization] = 'cancan'
prefs[:starter_app] = 'admin_app'
prefs[:form_builder] = 'simple_form'
+ prefs[:quiet_assets] = true
if prefer :git, true
prefs[:prelaunch_branch] = multiple_choice "Git branch for the prelaunch app?", [["wip (work-in-progress)", "wip"], ["master", "master"], ["prelaunch", "prelaunch"], ["staging", "staging"]]
if prefs[:prelaunch_branch] == 'master'
@@ -45,7 +46,8 @@
prefs[:devise_modules] = 'default'
prefs[:authorization] = 'cancan'
prefs[:starter_app] = 'admin_app'
- prefs[:form_builder] = 'none'
+ prefs[:form_builder] = 'simple_form'
+ prefs[:quiet_assets] = true
when 'rails3-devise-rspec-cucumber'
prefs[:git] = true
prefs[:database] = 'sqlite'
@@ -59,6 +61,7 @@
prefs[:authorization] = 'none'
prefs[:starter_app] = 'users_app'
prefs[:form_builder] = 'none'
+ prefs[:quiet_assets] = true
when 'rails3-mongoid-devise'
prefs[:git] = true
prefs[:database] = 'mongodb'
@@ -73,6 +76,7 @@
prefs[:authorization] = 'none'
prefs[:starter_app] = 'users_app'
prefs[:form_builder] = 'none'
+ prefs[:quiet_assets] = true
when 'rails3-mongoid-omniauth'
prefs[:git] = true
prefs[:database] = 'mongodb'
@@ -87,6 +91,7 @@
prefs[:authorization] = 'none'
prefs[:starter_app] = 'users_app'
prefs[:form_builder] = 'none'
+ prefs[:quiet_assets] = true
when 'rails3-subdomains'
prefs[:git] = true
prefs[:database] = 'mongodb'
@@ -101,6 +106,7 @@
prefs[:authorization] = 'none'
prefs[:starter_app] = 'subdomains_app'
prefs[:form_builder] = 'none'
+ prefs[:quiet_assets] = true
end
__END__
View
14 recipes/views.rb
@@ -4,9 +4,17 @@
after_bundler do
say_wizard "recipe running after 'bundle install'"
### DEVISE ###
- copy_from_repo 'app/views/devise/shared/_links.html.erb' if prefer :authentication, 'devise'
- copy_from_repo 'app/views/devise/registrations/edit.html.erb' if prefer :authentication, 'devise'
- copy_from_repo 'app/views/devise/registrations/new.html.erb' if prefer :authentication, 'devise'
+ if prefer :authentication, 'devise'
+ copy_from_repo 'app/views/devise/shared/_links.html.erb'
+ unless prefer :form_builder, 'simple_form'
+ copy_from_repo 'app/views/devise/registrations/edit.html.erb'
+ copy_from_repo 'app/views/devise/registrations/new.html.erb'
+ else
+ copy_from_repo 'app/views/devise/registrations/edit-simple_form.html.erb', :prefs => 'simple_form'
+ copy_from_repo 'app/views/devise/registrations/new-simple_form.html.erb', :prefs => 'simple_form'
+ copy_from_repo 'app/views/devise/sessions/new-simple_form.html.erb', :prefs => 'simple_form'
+ end
+ end
### HOME ###
copy_from_repo 'app/views/home/index.html.erb' if prefer :starter_app, 'users_app'
copy_from_repo 'app/views/home/index.html.erb' if prefer :starter_app, 'admin_app'
Please sign in to comment.
Something went wrong with that request. Please try again.