Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rename simple_form_install to simple_form:install

  • Loading branch information...
commit ae32faf6ebfe3d06291b0bfba0b250d05a903f0e 1 parent 303fb1f
José Valim josevalim authored
5 CHANGELOG.rdoc
View
@@ -1,5 +1,8 @@
+* deprecation
+ * Changed simple_form_install generator to simple_form:install
+
* enhancements
- * added support to presence validation to check if attribute is required or not (by github.com/gcirne)
+ * Added support to presence validation to check if attribute is required or not (by github.com/gcirne)
== 1.1.3
4 README.rdoc
View
@@ -16,7 +16,7 @@ Add it to your Gemfile:
Run the generator:
- rails generate simple_form_install
+ rails generate simple_form:install
And you are ready to go. Since this branch is aims Rails 3 support,
if you want to use it with Rails 2.3 you should check this branch:
@@ -298,7 +298,7 @@ There are other options that can be configured through I18n API, such as require
SimpleForm has several configuration values. You can read and change them in the initializer created by SimpleForm, so if you haven't executed the command below yet, please do:
- ruby script/generate simple_form_install
+ rails generate simple_form:install
== TODO
1  TODO.rdoc
View
@@ -4,6 +4,5 @@
== Validations
-* Add automatic :required check
* Add unobstrusive javascript validations support
* Add mask support (same as hint, but with JS)
0  lib/generators/simple_form_install/USAGE → lib/generators/simple_form/USAGE
View
File renamed without changes
23 lib/generators/simple_form/install_generator.rb
View
@@ -0,0 +1,23 @@
+module SimpleForm
+ module Generators
+ class InstallGenerator < Rails::Generators::Base
+ desc "Copy SimpleForm default files"
+
+ def self.source_root
+ @_source_root = File.expand_path('../templates', __FILE__)
+ end
+
+ def copy_initializers
+ copy_file 'simple_form.rb', 'config/initializers/simple_form.rb'
+ end
+
+ def copy_locale_file
+ copy_file 'en.yml', 'config/locales/simple_form.en.yml'
+ end
+
+ def copy_scaffold_template
+ copy_file '_form.html.erb', 'lib/templates/erb/scaffold/_form.html.erb'
+ end
+ end
+ end
+end
2  ...tors/simple_form_install/templates/_form.html.erb → lib/generators/simple_form/templates/_form.html.erb
View
@@ -1,4 +1,4 @@
-<%% simple_form_for(@<%= singular_name %>) do |f| %>
+<%%= simple_form_for(@<%= singular_name %>) do |f| %>
<div class="inputs">
<%- attributes.each do |attribute| -%>
<%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %>
0  lib/generators/simple_form_install/templates/en.yml → lib/generators/simple_form/templates/en.yml
View
File renamed without changes
0  ...tors/simple_form_install/templates/simple_form.rb → lib/generators/simple_form/templates/simple_form.rb
View
File renamed without changes
19 lib/generators/simple_form_install/simple_form_install_generator.rb
View
@@ -1,19 +0,0 @@
-class SimpleFormInstallGenerator < Rails::Generators::Base
- desc "Copy SimpleForm default files"
-
- def self.source_root
- @_source_root = File.expand_path('../templates', __FILE__)
- end
-
- def copy_initializers
- copy_file 'simple_form.rb', 'config/initializers/simple_form.rb'
- end
-
- def copy_locale_file
- copy_file 'en.yml', 'config/locales/simple_form.en.yml'
- end
-
- def copy_scaffold_template
- copy_file '_form.html.erb', 'lib/templates/erb/scaffold/_form.html.erb'
- end
-end
12 simple_form.gemspec
View
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Jos\303\251 Valim", "Carlos Ant\303\264nio"]
- s.date = %q{2010-04-03}
+ s.date = %q{2010-05-24}
s.description = %q{Forms made easy!}
s.email = %q{contact@plataformatec.com.br}
s.extra_rdoc_files = [
@@ -17,11 +17,11 @@ Gem::Specification.new do |s|
]
s.files = [
"init.rb",
- "lib/generators/simple_form_install/USAGE",
- "lib/generators/simple_form_install/simple_form_install_generator.rb",
- "lib/generators/simple_form_install/templates/_form.html.erb",
- "lib/generators/simple_form_install/templates/en.yml",
- "lib/generators/simple_form_install/templates/simple_form.rb",
+ "lib/generators/simple_form/USAGE",
+ "lib/generators/simple_form/install_generator.rb",
+ "lib/generators/simple_form/templates/_form.html.erb",
+ "lib/generators/simple_form/templates/en.yml",
+ "lib/generators/simple_form/templates/simple_form.rb",
"lib/simple_form.rb",
"lib/simple_form/action_view_extensions/builder.rb",
"lib/simple_form/action_view_extensions/form_helper.rb",
Please sign in to comment.
Something went wrong with that request. Please try again.