aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/generators/active_record.rb
diff options
context:
space:
mode:
authorYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-09-24 14:01:31 -0700
committerYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-09-24 16:11:41 -0700
commitf0dd77c6be6a86fe384bb0015151e0a497973d39 (patch)
treead81bb4c807c39edeaa37035882a16d9d95ebaa9 /railties/lib/generators/active_record.rb
parent610b81beca461a6fa4f00c7023e0e4315eb2b8be (diff)
downloadrails-f0dd77c6be6a86fe384bb0015151e0a497973d39.tar.gz
rails-f0dd77c6be6a86fe384bb0015151e0a497973d39.tar.bz2
rails-f0dd77c6be6a86fe384bb0015151e0a497973d39.zip
Move railties/lib/* into railties/lib/*
Diffstat (limited to 'railties/lib/generators/active_record.rb')
-rw-r--r--railties/lib/generators/active_record.rb56
1 files changed, 0 insertions, 56 deletions
diff --git a/railties/lib/generators/active_record.rb b/railties/lib/generators/active_record.rb
deleted file mode 100644
index ff3093f356..0000000000
--- a/railties/lib/generators/active_record.rb
+++ /dev/null
@@ -1,56 +0,0 @@
-require 'generators/named_base'
-require 'generators/migration'
-require 'generators/active_model'
-
-module ActiveRecord
- module Generators
- class Base < Rails::Generators::NamedBase #:nodoc:
- include Rails::Generators::Migration
-
- protected
- # Implement the required interface for Rails::Generators::Migration.
- #
- def next_migration_number(dirname) #:nodoc:
- if ActiveRecord::Base.timestamped_migrations
- Time.now.utc.strftime("%Y%m%d%H%M%S")
- else
- "%.3d" % (current_migration_number(dirname) + 1)
- end
- end
- end
-
- class ActiveModel < Rails::Generators::ActiveModel #:nodoc:
- def self.all(klass)
- "#{klass}.all"
- end
-
- def self.find(klass, params=nil)
- "#{klass}.find(#{params})"
- end
-
- def self.build(klass, params=nil)
- if params
- "#{klass}.new(#{params})"
- else
- "#{klass}.new"
- end
- end
-
- def save
- "#{name}.save"
- end
-
- def update_attributes(params=nil)
- "#{name}.update_attributes(#{params})"
- end
-
- def errors
- "#{name}.errors"
- end
-
- def destroy
- "#{name}.destroy"
- end
- end
- end
-end