Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.

Commit

Permalink
Update CHANGELOG. release v0.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
negonicrac committed Dec 12, 2010
1 parent 79e4198 commit 80dadd4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 38 deletions.
3 changes: 1 addition & 2 deletions 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
Expand Down
41 changes: 6 additions & 35 deletions lib/generators/helpers/model_helper.rb
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -71,5 +43,4 @@ def plural_class_name
end
end
end



2 changes: 1 addition & 1 deletion 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.