Skip to content

Commit

Permalink
Rename simple_form_install to simple_form:install
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed May 24, 2010
1 parent 303fb1f commit ae32faf
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 30 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.rdoc
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion TODO.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@

== Validations

* Add automatic :required check
* Add unobstrusive javascript validations support
* Add mask support (same as hint, but with JS)
File renamed without changes.
23 changes: 23 additions & 0 deletions lib/generators/simple_form/install_generator.rb
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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 %> %>
Expand Down
File renamed without changes.

This file was deleted.

12 changes: 6 additions & 6 deletions simple_form.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit ae32faf

Please sign in to comment.