simple_form, rails 4.0.1.rc1, capistrano 3 へのやっつけ対応

diff --git a/Gemfile b/Gemfile
index c7fa802..0047864 100644
--- a/Gemfile
+++ b/Gemfile
@@ -3,7 +3,7 @@ ruby '2.0.0'
 gem 'rbenv-rehash'

 # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
-gem 'rails', '4.0.0'
+gem 'rails', '4.0.1.rc1'

 # Use sqlite3 as the database for Active Record
 gem 'mysql2'
@@ -46,11 +46,12 @@ gem 'capistrano', group: :development
 # Use debugger
 # gem 'debugger', group: [:development, :test]

-gem 'font-awesome-sass-rails'
 gem 'bootstrap-sass-rails'
+gem 'compass-rails', github: 'Compass/compass-rails', branch: 'rails4-hack'
 gem 'slim'
 gem 'kaminari'
 gem "exception_notification"
+gem 'simple_form', github: 'plataformatec/simple_form', tag: 'v3.0.0.rc'

 gem 'acts-as-taggable-on'
 gem 'rails_autolink'
diff --git a/Gemfile.lock b/Gemfile.lock
index b66a0d2..5a6cdbc 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,25 +1,42 @@
+GIT
+  remote: git://github.com/Compass/compass-rails.git
+  revision: 32c16cb90f78053310b35199a970c53355bcd300
+  branch: rails4-hack
+  specs:
+    compass-rails (1.0.3)
+      compass (>= 0.12.2, < 0.14)
+
+GIT
+  remote: git://github.com/plataformatec/simple_form.git
+  revision: d2f1c63fa4b3fc93ef8c12610261960c8b0a5ab9
+  tag: v3.0.0.rc
+  specs:
+    simple_form (3.0.0.rc)
+      actionpack (>= 4.0.0.rc1, < 4.1)
+      activemodel (>= 4.0.0.rc1, < 4.1)
+
 GEM
   remote: https://rubygems.org/
   specs:
-    actionmailer (4.0.0)
-      actionpack (= 4.0.0)
-      mail (~> 2.5.3)
-    actionpack (4.0.0)
-      activesupport (= 4.0.0)
+    actionmailer (4.0.1.rc1)
+      actionpack (= 4.0.1.rc1)
+      mail (~> 2.5.4)
+    actionpack (4.0.1.rc1)
+      activesupport (= 4.0.1.rc1)
       builder (~> 3.1.0)
       erubis (~> 2.7.0)
       rack (~> 1.5.2)
       rack-test (~> 0.6.2)
-    activemodel (4.0.0)
-      activesupport (= 4.0.0)
+    activemodel (4.0.1.rc1)
+      activesupport (= 4.0.1.rc1)
       builder (~> 3.1.0)
-    activerecord (4.0.0)
-      activemodel (= 4.0.0)
+    activerecord (4.0.1.rc1)
+      activemodel (= 4.0.1.rc1)
       activerecord-deprecated_finders (~> 1.0.2)
-      activesupport (= 4.0.0)
+      activesupport (= 4.0.1.rc1)
       arel (~> 4.0.0)
     activerecord-deprecated_finders (1.0.3)
-    activesupport (4.0.0)
+    activesupport (4.0.1.rc1)
       i18n (~> 0.6, >= 0.6.4)
       minitest (~> 4.2)
       multi_json (~> 1.3)
@@ -28,96 +45,91 @@ GEM
     acts-as-taggable-on (2.4.1)
       rails (>= 3, < 5)
     arel (4.0.0)
-    atomic (1.1.10)
-    bootstrap-sass-rails (2.3.2.1)
+    atomic (1.1.14)
+    bootstrap-sass-rails (3.0.0.3)
       railties (>= 3.1.0)
       sass-rails (>= 3.1.0)
     builder (3.1.4)
-    capistrano (2.15.5)
-      highline
-      net-scp (>= 1.0.0)
-      net-sftp (>= 2.0.0)
-      net-ssh (>= 2.0.14)
-      net-ssh-gateway (>= 1.1.0)
-    coffee-rails (4.0.0)
+    capistrano (3.0.0)
+      i18n
+      rake (>= 10.0.0)
+      sshkit (>= 0.0.23)
+    chunky_png (1.2.9)
+    coffee-rails (4.0.1)
       coffee-script (>= 2.2.0)
-      railties (>= 4.0.0.beta, < 5.0)
+      railties (>= 4.0.0, < 5.0)
     coffee-script (2.2.0)
       coffee-script-source
       execjs
     coffee-script-source (1.6.3)
-    database_cleaner (1.1.1)
+    compass (0.12.2)
+      chunky_png (~> 1.2)
+      fssm (>= 0.2.7)
+      sass (~> 3.1)
+    database_cleaner (1.2.0)
     diff-lcs (1.2.4)
     erubis (2.7.0)
-    exception_notification (4.0.0)
+    exception_notification (4.0.1)
       actionmailer (>= 3.0.4)
       activesupport (>= 3.0.4)
-    execjs (1.4.0)
-      multi_json (~> 1.0)
+    execjs (2.0.2)
     factory_girl (4.2.0)
       activesupport (>= 3.0.0)
     factory_girl_rails (4.2.1)
       factory_girl (~> 4.2.0)
       railties (>= 3.0.0)
-    font-awesome-sass-rails (3.0.2.2)
-      railties (>= 3.1.1)
-      sass-rails (>= 3.1.1)
-    highline (1.6.19)
+    fssm (0.2.10)
     hike (1.2.3)
-    i18n (0.6.4)
-    jbuilder (1.5.0)
+    i18n (0.6.5)
+    jbuilder (1.5.2)
       activesupport (>= 3.0.0)
       multi_json (>= 1.2.0)
     jquery-rails (3.0.4)
       railties (>= 3.0, < 5.0)
       thor (>= 0.14, < 2.0)
-    json (1.8.0)
+    json (1.8.1)
     kaminari (0.14.1)
       actionpack (>= 3.0.0)
       activesupport (>= 3.0.0)
-    kgio (2.8.0)
+    kgio (2.8.1)
     mail (2.5.4)
       mime-types (~> 1.16)
       treetop (~> 1.4.8)
-    mime-types (1.23)
+    mime-types (1.25)
     minitest (4.7.5)
-    multi_json (1.7.7)
+    multi_json (1.8.2)
     mysql2 (0.3.13)
     net-scp (1.1.2)
       net-ssh (>= 2.6.5)
-    net-sftp (2.1.2)
-      net-ssh (>= 2.6.5)
-    net-ssh (2.6.8)
-    net-ssh-gateway (1.2.0)
-      net-ssh (>= 2.6.5)
+    net-ssh (2.7.0)
     polyglot (0.3.3)
     rack (1.5.2)
     rack-test (0.6.2)
       rack (>= 1.0)
-    rails (4.0.0)
-      actionmailer (= 4.0.0)
-      actionpack (= 4.0.0)
-      activerecord (= 4.0.0)
-      activesupport (= 4.0.0)
+    rails (4.0.1.rc1)
+      actionmailer (= 4.0.1.rc1)
+      actionpack (= 4.0.1.rc1)
+      activerecord (= 4.0.1.rc1)
+      activesupport (= 4.0.1.rc1)
       bundler (>= 1.3.0, < 2.0)
-      railties (= 4.0.0)
+      railties (= 4.0.1.rc1)
       sprockets-rails (~> 2.0.0)
-    rails_autolink (1.1.0)
+    rails_autolink (1.1.4)
       rails (> 3.1)
-    railties (4.0.0)
-      actionpack (= 4.0.0)
-      activesupport (= 4.0.0)
+    railties (4.0.1.rc1)
+      actionpack (= 4.0.1.rc1)
+      activesupport (= 4.0.1.rc1)
       rake (>= 0.8.7)
       thor (>= 0.18.1, < 2.0)
-    raindrops (0.11.0)
+    raindrops (0.12.0)
     rake (10.1.0)
     rbenv-rehash (0.3)
     rdoc (3.12.2)
       json (~> 1.4)
-    rspec-core (2.14.4)
-    rspec-expectations (2.14.0)
+    rspec-core (2.14.6)
+    rspec-expectations (2.14.3)
       diff-lcs (>= 1.1.3, < 2.0)
-    rspec-mocks (2.14.2)
+    rspec-mocks (2.14.4)
     rspec-rails (2.14.0)
       actionpack (>= 3.0)
       activesupport (>= 3.0)
@@ -125,9 +137,9 @@ GEM
       rspec-core (~> 2.14.0)
       rspec-expectations (~> 2.14.0)
       rspec-mocks (~> 2.14.0)
-    sass (3.2.10)
-    sass-rails (4.0.0)
-      railties (>= 4.0.0.beta, < 5.0)
+    sass (3.2.12)
+    sass-rails (4.0.1)
+      railties (>= 4.0.0, < 5.0)
       sass (>= 3.1.10)
       sprockets-rails (~> 2.0.0)
     sdoc (0.3.20)
@@ -141,25 +153,32 @@ GEM
       multi_json (~> 1.0)
       rack (~> 1.0)
       tilt (~> 1.1, != 1.3.0)
-    sprockets-rails (2.0.0)
+    sprockets-rails (2.0.1)
       actionpack (>= 3.0)
       activesupport (>= 3.0)
       sprockets (~> 2.8)
+    sshkit (1.1.0)
+      net-scp
+      net-ssh
+      term-ansicolor
     tapp (1.4.0)
       thor
-    temple (0.6.6)
+    temple (0.6.7)
+    term-ansicolor (1.2.2)
+      tins (~> 0.8)
     thor (0.18.1)
-    thread_safe (0.1.2)
+    thread_safe (0.1.3)
       atomic
     tilt (1.4.1)
-    timecop (0.6.2.2)
-    treetop (1.4.14)
+    timecop (0.6.3)
+    tins (0.12.0)
+    treetop (1.4.15)
       polyglot
       polyglot (>= 0.3.1)
     turbolinks (1.3.0)
       coffee-rails
-    tzinfo (0.3.37)
-    uglifier (2.1.2)
+    tzinfo (0.3.38)
+    uglifier (2.2.1)
       execjs (>= 0.3.0)
       multi_json (~> 1.0, >= 1.0.2)
     unicorn (4.6.3)
@@ -175,20 +194,21 @@ DEPENDENCIES
   bootstrap-sass-rails
   capistrano
   coffee-rails (~> 4.0.0)
+  compass-rails!
   database_cleaner
   exception_notification
   factory_girl_rails
-  font-awesome-sass-rails
   jbuilder (~> 1.2)
   jquery-rails
   kaminari
   mysql2
-  rails (= 4.0.0)
+  rails (= 4.0.1.rc1)
   rails_autolink
   rbenv-rehash
   rspec-rails
   sass-rails (~> 4.0.0)
   sdoc
+  simple_form!
   slim
   tapp
   timecop
diff --git a/app/assets/javascripts/application.coffee b/app/assets/javascripts/application.coffee
index ef7dc83..c9aaaa3 100644
--- a/app/assets/javascripts/application.coffee
+++ b/app/assets/javascripts/application.coffee
@@ -12,5 +12,5 @@
 #
 #= require jquery
 #= require jquery_ujs
-#= require turbolinks
+#  require turbolinks
 #= require_tree .
diff --git a/app/assets/stylesheets/application.sass b/app/assets/stylesheets/application.sass
index e66c3a0..4cd8246 100644
--- a/app/assets/stylesheets/application.sass
+++ b/app/assets/stylesheets/application.sass
@@ -1,21 +1,18 @@
-// *= require twitter/bootstrap-no-sprites
+// *= require twitter/bootstrap
 // *= require_self
 // *= require_tree .

+@import "compass/utilities"
+@import "compass/css3"
+
 body
   padding-top: 60px

-@import "twitter/bootstrap/responsive"
-@import "font-awesome"
-
 .footer
   background-color: #eee
-  min-width: 940px
   padding: 30px 0
-  text-shadow: 0 1px 0 #fff
+  +text-shadow(0 1px 0 #fff)
   border-top: 1px solid #e5e5e5
-  -webkit-box-shadow: inset 0 5px 15px rgba(0,0,0,.025)
-  -moz-box-shadow: inset 0 5px 15px rgba(0,0,0,.025)
-  box-shadow: inset 0 5px 15px rgba(0,0,0,.025)
+  +box-shadow(inset 0 5px 15px rgba(0,0,0,.025))
   p
     color: #555
diff --git a/app/views/articles/_form.html.slim b/app/views/articles/_form.html.slim
index b3193a1..6255d0d 100644
--- a/app/views/articles/_form.html.slim
+++ b/app/views/articles/_form.html.slim
@@ -1,22 +1,6 @@
-= form_for(@article, :html => {:class => nil}) do |f|
-  - if @article.errors.any?
-    = content_tag(:div, :id => "error_explanation") do
-      = content_tag(:h2, "#{@article.errors.count}個のエラーがあります")
-      ul
-        - @article.errors.full_messages.each do |msg|
-          li
-            = msg
-  .control-group
-    = f.label(:title, :class => "control-label")
-    .controls
-      = f.text_field :title, :class => "input-block-level"
-  .control-group
-    = f.label(:tag_list, :class => "control-label")
-    .controls
-      = f.text_field :tag_list, :class => "input-block-level"
-  .control-group
-    = f.label(:body, :class => "control-label")
-    .controls
-      = f.text_area :body, :rows => 16, :class => "input-block-level"
-  .form-actions
-    = f.submit(:class => "btn btn-primary")
+= simple_form_for(@article, :defaults => {:input_html => {:class => "form-control"}}) do |form|
+  = form.error_notification
+  = form.input :title
+  = form.input :tag_list
+  = form.input :body
+  = form.button(:submit)
diff --git a/app/views/articles/_show.html.slim b/app/views/articles/_show.html.slim
index bb5a8b9..7767bae 100644
--- a/app/views/articles/_show.html.slim
+++ b/app/views/articles/_show.html.slim
@@ -5,5 +5,7 @@ p
   = article_tag_list article.tag_list
   p.muted
     = article.created_at.strftime("%Y-%m-%d %H:%M")
-    = link_to bootstrap_icon(:edit), [:edit, article]
-    = link_to bootstrap_icon(:trash), article, :data => {:confirm => "本当に？"}, :method => :delete
+    = " "
+    = link_to "編集", [:edit, article], :class => "glyphicon glyphicon-edit"
+    = " "
+    = link_to "削除", article, :data => {:confirm => "本当に？"}, :method => :delete, :class => "glyphicon glyphicon-trash"
diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim
index 3c22d39..ff43e45 100644
--- a/app/views/layouts/application.html.slim
+++ b/app/views/layouts/application.html.slim
@@ -6,26 +6,31 @@ html{lang="ja"}
     = csrf_meta_tag
     = stylesheet_link_tag :application
     = content_tag(:title, html_title)
+    meta{name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no"}
   body
-    .navbar.navbar-inverse.navbar-fixed-top
-      .navbar-inner
-        .container-fluid
-          = link_to((content_tag(:span, "", class: "icon-bar") * 3).html_safe, "#", class: "btn btn-navbar", :data => {:toggle => "collapse", :target => ".nav-collapse"})
-          = link_to(AppConfig[:app_name], :root, class: "brand")
-          ul.nav
+    nav.navbar.navbar-default.navbar-fixed-top.navbar-inverse role="navigation"
+      .container
+        .navbar-header
+          button.navbar-toggle data-target=".navbar-ex1-collapse" data-toggle="collapse" type="button"
+            span.sr-only Toggle navigation
+            span.icon-bar
+            span.icon-bar
+            span.icon-bar
+          = link_to(AppConfig[:app_name], :root, class: "navbar-brand")
+        .collapse.navbar-collapse.navbar-ex1-collapse
+          ul.nav.navbar-nav
             li
-              = link_to(bootstrap_icon(:edit), [:new, :article])
-          = form_tag(:articles, :method => :get, class: "navbar-search pull-right") do
-            = search_field_tag :query, params[:query], class: "search-query", placeholder: "検索"
-    .container-fluid
-      .row-fluid
-        .span12
-          - if notice
-            p#notice
-              = notice
-          = yield
+              = link_to("NEW", [:new, :article])
+          form.navbar-form.navbar-left role="search"
+            .form-group
+              = search_field_tag :query, params[:query], class: "form-control", placeholder: "検索"
+    .container
+      - if notice
+        p#notice
+          = notice
+      = yield
     footer.footer
-      .container-fluid
+      .container
         p
           = "Powered by Rails #{Rails.version} and Ruby #{RUBY_VERSION}"
     = javascript_include_tag(:application)
diff --git a/config/initializers/simple_form.rb b/config/initializers/simple_form.rb
new file mode 100644
index 0000000..40b05d8
--- /dev/null
+++ b/config/initializers/simple_form.rb
@@ -0,0 +1,142 @@
+# Use this setup block to configure all options available in SimpleForm.
+SimpleForm.setup do |config|
+  # Wrappers are used by the form builder to generate a
+  # complete input. You can remove any component from the
+  # wrapper, change the order or even add your own to the
+  # stack. The options given below are used to wrap the
+  # whole input.
+  config.wrappers :default, class: :input,
+    hint_class: :field_with_hint, error_class: :field_with_errors do |b|
+    ## Extensions enabled by default
+    # Any of these extensions can be disabled for a
+    # given input by passing: `f.input EXTENSION_NAME => false`.
+    # You can make any of these extensions optional by
+    # renaming `b.use` to `b.optional`.
+
+    # Determines whether to use HTML5 (:email, :url, ...)
+    # and required attributes
+    b.use :html5
+
+    # Calculates placeholders automatically from I18n
+    # You can also pass a string as f.input placeholder: "Placeholder"
+    b.use :placeholder
+
+    ## Optional extensions
+    # They are disabled unless you pass `f.input EXTENSION_NAME => :lookup`
+    # to the input. If so, they will retrieve the values from the model
+    # if any exists. If you want to enable the lookup for any of those
+    # extensions by default, you can change `b.optional` to `b.use`.
+
+    # Calculates maxlength from length validations for string inputs
+    b.optional :maxlength
+
+    # Calculates pattern from format validations for string inputs
+    b.optional :pattern
+
+    # Calculates min and max from length validations for numeric inputs
+    b.optional :min_max
+
+    # Calculates readonly automatically from readonly attributes
+    b.optional :readonly
+
+    ## Inputs
+    b.use :label_input
+    b.use :hint,  wrap_with: { tag: :span, class: :hint }
+    b.use :error, wrap_with: { tag: :span, class: :error }
+  end
+
+  # The default wrapper to be used by the FormBuilder.
+  config.default_wrapper = :default
+
+  # Define the way to render check boxes / radio buttons with labels.
+  # Defaults to :nested for bootstrap config.
+  #   inline: input + label
+  #   nested: label > input
+  config.boolean_style = :nested
+
+  # Default class for buttons
+  config.button_class = 'btn'
+
+  # Method used to tidy up errors. Specify any Rails Array method.
+  # :first lists the first message for each field.
+  # Use :to_sentence to list all errors for each field.
+  # config.error_method = :first
+
+  # Default tag used for error notification helper.
+  config.error_notification_tag = :div
+
+  # CSS class to add for error notification helper.
+  config.error_notification_class = 'alert alert-error'
+
+  # ID to add for error notification helper.
+  # config.error_notification_id = nil
+
+  # Series of attempts to detect a default label method for collection.
+  # config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
+
+  # Series of attempts to detect a default value method for collection.
+  # config.collection_value_methods = [ :id, :to_s ]
+
+  # You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
+  # config.collection_wrapper_tag = nil
+
+  # You can define the class to use on all collection wrappers. Defaulting to none.
+  # config.collection_wrapper_class = nil
+
+  # You can wrap each item in a collection of radio/check boxes with a tag,
+  # defaulting to :span. Please note that when using :boolean_style = :nested,
+  # SimpleForm will force this option to be a label.
+  # config.item_wrapper_tag = :span
+
+  # You can define a class to use in all item wrappers. Defaulting to none.
+  # config.item_wrapper_class = nil
+
+  # How the label text should be generated altogether with the required text.
+  # config.label_text = lambda { |label, required| "#{required} #{label}" }
+
+  # You can define the class to use on all labels. Default is nil.
+  config.label_class = 'control-label'
+
+  # You can define the class to use on all forms. Default is simple_form.
+  # config.form_class = :simple_form
+
+  # You can define which elements should obtain additional classes
+  # config.generate_additional_classes_for = [:wrapper, :label, :input]
+
+  # Whether attributes are required by default (or not). Default is true.
+  # config.required_by_default = true
+
+  # Tell browsers whether to use the native HTML5 validations (novalidate form option).
+  # These validations are enabled in SimpleForm's internal config but disabled by default
+  # in this configuration, which is recommended due to some quirks from different browsers.
+  # To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations,
+  # change this configuration to true.
+  config.browser_validations = false
+
+  # Collection of methods to detect if a file type was given.
+  # config.file_methods = [ :mounted_as, :file?, :public_filename ]
+
+  # Custom mappings for input types. This should be a hash containing a regexp
+  # to match as key, and the input type that will be used when the field name
+  # matches the regexp as value.
+  # config.input_mappings = { /count/ => :integer }
+
+  # Custom wrappers for input types. This should be a hash containing an input
+  # type as key and the wrapper that will be used for all inputs with specified type.
+  # config.wrapper_mappings = { string: :prepend }
+
+  # Default priority for time_zone inputs.
+  # config.time_zone_priority = nil
+
+  # Default priority for country inputs.
+  # config.country_priority = nil
+
+  # When false, do not use translations for labels.
+  # config.translate_labels = true
+
+  # Automatically discover new inputs in Rails' autoload path.
+  # config.inputs_discovery = true
+
+  # Cache SimpleForm inputs discovery
+  # config.cache_discovery = !Rails.env.development?
+end
diff --git a/config/initializers/simple_form_bootstrap.rb b/config/initializers/simple_form_bootstrap.rb
new file mode 100644
index 0000000..46dc075
--- /dev/null
+++ b/config/initializers/simple_form_bootstrap.rb
@@ -0,0 +1,48 @@
+# Use this setup block to configure all options available in SimpleForm.
+SimpleForm.setup do |config|
+  config.wrappers :bootstrap, :tag => 'div', :class => 'form-group', :error_class => 'has-error' do |b|
+    b.use :html5
+    b.use :placeholder
+    b.use :label
+    b.use :input, :wrap_with => { :tag => 'div', :class => 'controls col-xs-12 col-sm-12 col-md-12 col-lg-12' }
+    b.use :error, :wrap_with => { :tag => 'span', :class => 'help-block' }
+    b.use :hint,  :wrap_with => { :tag => 'p', :class => 'help-block' }
+  end
+
+  config.wrappers :prepend, tag: 'div', class: "control-group", error_class: 'error' do |b|
+    b.use :html5
+    b.use :placeholder
+    b.use :label
+    b.wrapper tag: 'div', class: 'controls' do |input|
+      input.wrapper tag: 'div', class: 'input-prepend' do |prepend|
+        prepend.use :input
+      end
+      input.use :hint,  wrap_with: { tag: 'span', class: 'help-block' }
+      input.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
+    end
+  end
+
+  config.wrappers :append, tag: 'div', class: "control-group", error_class: 'error' do |b|
+    b.use :html5
+    b.use :placeholder
+    b.use :label
+    b.wrapper tag: 'div', class: 'controls' do |input|
+      input.wrapper tag: 'div', class: 'input-append' do |append|
+        append.use :input
+      end
+      input.use :hint,  wrap_with: { tag: 'span', class: 'help-block' }
+      input.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
+    end
+  end
+
+  # # Wrappers for forms and inputs using the Twitter Bootstrap toolkit.
+  # # Check the Bootstrap docs (http://twitter.github.com/bootstrap)
+  # # to learn about the different styles for forms and inputs,
+  # # buttons and other elements.
+  # config.default_wrapper = :bootstrap
+
+  config.form_class = "form-horizontal"
+  config.label_class = "col-xs-12 col-sm-12 col-md-12 col-lg-12 control-label"
+  #config.input_class = "form-control" #not yet supported
+  config.default_wrapper = :bootstrap
+end
diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml
new file mode 100644
index 0000000..0df11fe
--- /dev/null
+++ b/config/locales/simple_form.en.yml
@@ -0,0 +1,26 @@
+en:
+  simple_form:
+    "yes": 'Yes'
+    "no": 'No'
+    required:
+      text: 'required'
+      mark: '*'
+      # You can uncomment the line below if you need to overwrite the whole required html.
+      # When using html, text and mark won't be used.
+      # html: '<abbr title="required">*</abbr>'
+    error_notification:
+      default_message: "Please review the problems below:"
+    # Labels and hints examples
+    # labels:
+    #   defaults:
+    #     password: 'Password'
+    #   user:
+    #     new:
+    #       email: 'E-mail to sign in.'
+    #     edit:
+    #       email: 'E-mail.'
+    # hints:
+    #   defaults:
+    #     username: 'User name to sign in.'
+    #     password: 'No special characters, please.'
+
diff --git a/lib/templates/erb/scaffold/_form.html.erb b/lib/templates/erb/scaffold/_form.html.erb
new file mode 100644
index 0000000..201a069
--- /dev/null
+++ b/lib/templates/erb/scaffold/_form.html.erb
@@ -0,0 +1,13 @@
+<%%= simple_form_for(@<%= singular_table_name %>) do |f| %>
+  <%%= f.error_notification %>
+
+  <div class="form-inputs">
+  <%- attributes.each do |attribute| -%>
+    <%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %>
+  <%- end -%>
+  </div>
+
+  <div class="form-actions">
+    <%%= f.button :submit %>
+  </div>
+<%% end %>