Skip to content

Commit

Permalink
[padrino-admin] Removed classify because run also a wrong singularize…
Browse files Browse the repository at this point in the history
… and instead use camelize.
  • Loading branch information
DAddYE committed Sep 24, 2010
1 parent 9479ba6 commit 41ff2b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ end

desc "Clean pkg and other stuff"
task :uninstall do
sh "gem search --no-version padrino | grep padrino | xargs gem uninstall -a"
sudo_sh "gem search --no-version padrino | grep padrino | xargs gem uninstall -a"
end

desc "Displays the current version"
Expand Down
6 changes: 3 additions & 3 deletions padrino-admin/lib/padrino-admin/generators/orm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ class Orm

def initialize(name, orm, columns=nil, column_fields=nil)
name = name.to_s
@klass_name = name.classify
@klass = name.classify.constantize rescue nil
@klass_name = name.camelize
@klass = @klass_name.constantize rescue nil
@name_plural = name.underscore.pluralize
@name_singular = name.underscore
@orm = orm.to_sym
@columns = columns
@column_fields = column_fields
raise OrmError, "Model '#{name}' could not be found!" if @columns.nil? && @klass.nil?
raise OrmError, "Model '#{klass_name}' could not be found!" if @columns.nil? && @klass.nil?
end

def field_type(type)
Expand Down

0 comments on commit 41ff2b5

Please sign in to comment.