Permalink
Browse files

Rename simple_form_install to simple_form:install

  • Loading branch information...
1 parent 303fb1f commit ae32faf6ebfe3d06291b0bfba0b250d05a903f0e @josevalim josevalim committed May 24, 2010
View
5 CHANGELOG.rdoc
@@ -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
View
4 README.rdoc
@@ -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
View
1 TODO.rdoc
@@ -4,6 +4,5 @@
== Validations
-* Add automatic :required check
* Add unobstrusive javascript validations support
* Add mask support (same as hint, but with JS)
View
0 lib/generators/simple_form_install/USAGE → lib/generators/simple_form/USAGE
File renamed without changes.
View
23 lib/generators/simple_form/install_generator.rb
@@ -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
View
2 ...ple_form_install/templates/_form.html.erb → ...tors/simple_form/templates/_form.html.erb
@@ -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 %> %>
View
0 ...tors/simple_form_install/templates/en.yml → lib/generators/simple_form/templates/en.yml
File renamed without changes.
View
0 ...ple_form_install/templates/simple_form.rb → ...tors/simple_form/templates/simple_form.rb
File renamed without changes.
View
19 lib/generators/simple_form_install/simple_form_install_generator.rb
@@ -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
View
12 simple_form.gemspec
@@ -9,19 +9,19 @@ 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 = [
"README.rdoc"
]
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",

0 comments on commit ae32faf

Please sign in to comment.