Browse files

Update CHANGELOG. release v0.16.0

  • Loading branch information...
1 parent 79e4198 commit 80dadd4544d42d46aec1347e04a15d4a3f67be9a @negonicrac negonicrac committed Dec 12, 2010
Showing with 8 additions and 38 deletions.
  1. +1 −2 CHANGELOG.rdoc
  2. +6 −35 lib/generators/helpers/model_helper.rb
  3. +1 −1 lib/rails3-generators/version.rb
View
3 CHANGELOG.rdoc
@@ -1,7 +1,6 @@
== TODO
-* Grow Mustache up.(fix the TODOs and move the source to a mustache-rails like gem)
* Write some documentation. (In both the github wiki and the source code)
-* remove generators that exist in other libraries
+* Remove generators that exist in other libraries
== 0.16.0
* optimize
View
41 lib/generators/helpers/model_helper.rb
@@ -5,37 +5,9 @@ module Model
attr_accessor :model_attributes, :model_indexes
def parse_model_attributes(with_indexes = true)
- @model_attributes = []
+ @model_attributes = []
@model_indexes = {}
- #
- # attributes.each do |arg|
- # if with_indexes
- # # extract index markers
- # if arg.include?('#')
- # arg.gsub! /#.*$/, ''
- # model_indexes[arg_name(arg).to_sym] = true
- # end
- # end
- #
- # if arg.include?(':')
- # model_attributes << Rails::Generators::GeneratedAttribute.new(*arg.split(':'))
- # else
- # model_attributes << Rails::Generators::GeneratedAttribute.new(arg, "string")
- # end
- #
- # model_attributes.uniq!
- #
- # if model_attributes.empty?
- # if model_exists?
- # model_columns_for_attributes.each do |column|
- # model_attributes << Rails::Generators::GeneratedAttribute.new(column.name.to_s, column.type.to_s)
- # end
- # else
- # model_attributes << Rails::Generators::GeneratedAttribute.new('name', 'string')
- # end
- # end
- # end
- end
+ end
def arg_name(arg)
arg.split(':').first
@@ -44,11 +16,11 @@ def arg_name(arg)
def arg_type(arg)
arg.split(':')[1] || 'string'
end
-
+
def model_name
name
- end
-
+ end
+
def model_exists?
File.exist? destination_path("app/models/#{singular_name}.rb")
end
@@ -71,5 +43,4 @@ def plural_class_name
end
end
end
-
-
+
View
2 lib/rails3-generators/version.rb
@@ -1,5 +1,5 @@
module Rails3
module Generators
- VERSION = "0.16.0.beta"
+ VERSION = "0.16.0"
end
end

0 comments on commit 80dadd4

Please sign in to comment.