aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-06-06 22:23:30 +0200
committerXavier Noria <fxn@hashref.com>2011-06-06 22:23:30 +0200
commit5e21247131fa7d5484190c9a71b74f9d3f090684 (patch)
tree5eee39fcabb952cafd513caf7e67943bc6b26e98 /activeresource
parent38ad6bb2f566202dd522a0cf31a55a746f122d53 (diff)
parent689e12b828665b7b2cfcda85d46249c5cf2aa713 (diff)
downloadrails-5e21247131fa7d5484190c9a71b74f9d3f090684.tar.gz
rails-5e21247131fa7d5484190c9a71b74f9d3f090684.tar.bz2
rails-5e21247131fa7d5484190c9a71b74f9d3f090684.zip
Merge branch 'master' of git://github.com/lifo/docrails
Conflicts: activerecord/RUNNING_UNIT_TESTS
Diffstat (limited to 'activeresource')
-rw-r--r--activeresource/lib/active_resource/schema.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/activeresource/lib/active_resource/schema.rb b/activeresource/lib/active_resource/schema.rb
index 3fd37a9bb6..5957969aa2 100644
--- a/activeresource/lib/active_resource/schema.rb
+++ b/activeresource/lib/active_resource/schema.rb
@@ -20,8 +20,8 @@ module ActiveResource # :nodoc:
# end
#
# The schema stores the name and type of each attribute. That is then
- # read out by the schema method to populate the actual
- # Resource's schema
+ # read out by the schema method to populate the schema of the actual
+ # resource.
def initialize
@attrs = {}
end
@@ -40,6 +40,12 @@ module ActiveResource # :nodoc:
# The following are the attribute types supported by Active Resource
# migrations.
KNOWN_ATTRIBUTE_TYPES.each do |attr_type|
+ # def string(*args)
+ # options = args.extract_options!
+ # attr_names = args
+ #
+ # attr_names.each { |name| attribute(name, 'string', options) }
+ # end
class_eval <<-EOV, __FILE__, __LINE__ + 1
def #{attr_type.to_s}(*args)
options = args.extract_options!