Permalink
Browse files

changing my mind about can_has_load

  • Loading branch information...
1 parent 355b444 commit 54f2501dd5da09a53d84ed3910d546b615b4f689 @zachinglis committed May 5, 2008
Showing with 0 additions and 429 deletions.
  1. +0 −109 vendor/plugins/can_has_load/.svn/entries
  2. +0 −1 vendor/plugins/can_has_load/.svn/format
  3. +0 −20 vendor/plugins/can_has_load/.svn/text-base/MIT-LICENSE.svn-base
  4. +0 −13 vendor/plugins/can_has_load/.svn/text-base/README.svn-base
  5. +0 −22 vendor/plugins/can_has_load/.svn/text-base/Rakefile.svn-base
  6. +0 −3 vendor/plugins/can_has_load/.svn/text-base/init.rb.svn-base
  7. +0 −1 vendor/plugins/can_has_load/.svn/text-base/install.rb.svn-base
  8. +0 −1 vendor/plugins/can_has_load/.svn/text-base/uninstall.rb.svn-base
  9. +0 −20 vendor/plugins/can_has_load/MIT-LICENSE
  10. +0 −1 vendor/plugins/can_has_load/README
  11. +0 −22 vendor/plugins/can_has_load/Rakefile
  12. +0 −3 vendor/plugins/can_has_load/init.rb
  13. +0 −1 vendor/plugins/can_has_load/install.rb
  14. +0 −40 vendor/plugins/can_has_load/lib/.svn/entries
  15. +0 −1 vendor/plugins/can_has_load/lib/.svn/format
  16. +0 −32 vendor/plugins/can_has_load/lib/.svn/text-base/can_has_load.rb.svn-base
  17. +0 −32 vendor/plugins/can_has_load/lib/can_has_load.rb
  18. +0 −40 vendor/plugins/can_has_load/tasks/.svn/entries
  19. +0 −1 vendor/plugins/can_has_load/tasks/.svn/format
  20. +0 −4 vendor/plugins/can_has_load/tasks/.svn/text-base/can_has_load_tasks.rake.svn-base
  21. +0 −4 vendor/plugins/can_has_load/tasks/can_has_load_tasks.rake
  22. +0 −40 vendor/plugins/can_has_load/test/.svn/entries
  23. +0 −1 vendor/plugins/can_has_load/test/.svn/format
  24. +0 −8 vendor/plugins/can_has_load/test/.svn/text-base/can_has_load_test.rb.svn-base
  25. +0 −8 vendor/plugins/can_has_load/test/can_has_load_test.rb
  26. +0 −1 vendor/plugins/can_has_load/uninstall.rb
@@ -1,109 +0,0 @@
-8
-
-dir
-316
-https://hashrocket.svn.beanstalkapp.com/skillz/trunk/vendor/plugins/can_has_load
-https://hashrocket.svn.beanstalkapp.com/skillz
-
-
-
-2008-04-24T01:49:32.604619Z
-265
-leshill
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-765dc827-1b2f-43c5-b201-8c6ec2a979ac
-
-test
-dir
-
-Rakefile
-file
-
-
-
-
-2008-04-02T18:14:46.000000Z
-dd71151f4deafc38fe8f51feb43a57f0
-2008-04-02T18:14:06.650380Z
-102
-ReinH
-
-tasks
-dir
-
-init.rb
-file
-
-
-
-
-2008-04-02T18:14:46.000000Z
-4fdcdf3fcecac461b9eb9e2e80227b41
-2008-04-02T18:14:06.650380Z
-102
-ReinH
-
-lib
-dir
-
-install.rb
-file
-
-
-
-
-2008-04-02T18:14:46.000000Z
-cbe738c10eba4ae2da8c6859c9723e44
-2008-04-02T18:14:06.650380Z
-102
-ReinH
-
-MIT-LICENSE
-file
-
-
-
-
-2008-04-02T18:14:46.000000Z
-ef8a8411d1f142aee549cd9a00a720d5
-2008-04-02T18:14:06.650380Z
-102
-ReinH
-
-uninstall.rb
-file
-
-
-
-
-2008-04-02T18:14:46.000000Z
-2a5fc883fe7f8dfe22ced24643d59ad4
-2008-04-02T18:14:06.650380Z
-102
-ReinH
-
-README
-file
-
-
-
-
-2008-04-02T18:14:46.000000Z
-93de8c875c2444c58aef7419904346f3
-2008-04-02T18:14:06.650380Z
-102
-ReinH
-
@@ -1 +0,0 @@
-8
@@ -1,20 +0,0 @@
-Copyright (c) 2008 [name of plugin creator]
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,13 +0,0 @@
-CanHasLoad
-==========
-
-Introduction goes here.
-
-
-Example
-=======
-
-Example goes here.
-
-
-Copyright (c) 2008 [name of plugin creator], released under the MIT license
@@ -1,22 +0,0 @@
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-
-desc 'Default: run unit tests.'
-task :default => :test
-
-desc 'Test the can_has_load plugin.'
-Rake::TestTask.new(:test) do |t|
- t.libs << 'lib'
- t.pattern = 'test/**/*_test.rb'
- t.verbose = true
-end
-
-desc 'Generate documentation for the can_has_load plugin.'
-Rake::RDocTask.new(:rdoc) do |rdoc|
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = 'CanHasLoad'
- rdoc.options << '--line-numbers' << '--inline-source'
- rdoc.rdoc_files.include('README')
- rdoc.rdoc_files.include('lib/**/*.rb')
-end
@@ -1,3 +0,0 @@
-# Include hook code here
-ActiveRecord::Base.extend CanHasLoad::CanHasActiveRecord
-ActionController::Base.extend CanHasLoad::CanHasActionController
@@ -1 +0,0 @@
-# Install hook code here
@@ -1 +0,0 @@
-# Uninstall hook code here
@@ -1,20 +0,0 @@
-Copyright (c) 2008 [name of plugin creator]
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1 +0,0 @@
-CanHasLoad by Rein Henrichs - reinh.com
@@ -1,22 +0,0 @@
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-
-desc 'Default: run unit tests.'
-task :default => :test
-
-desc 'Test the can_has_load plugin.'
-Rake::TestTask.new(:test) do |t|
- t.libs << 'lib'
- t.pattern = 'test/**/*_test.rb'
- t.verbose = true
-end
-
-desc 'Generate documentation for the can_has_load plugin.'
-Rake::RDocTask.new(:rdoc) do |rdoc|
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = 'CanHasLoad'
- rdoc.options << '--line-numbers' << '--inline-source'
- rdoc.rdoc_files.include('README')
- rdoc.rdoc_files.include('lib/**/*.rb')
-end
@@ -1,3 +0,0 @@
-# Include hook code here
-ActiveRecord::Base.extend CanHasLoad::CanHasActiveRecord
-ActionController::Base.extend CanHasLoad::CanHasActionController
@@ -1 +0,0 @@
-# Install hook code here
@@ -1,40 +0,0 @@
-8
-
-dir
-316
-https://hashrocket.svn.beanstalkapp.com/skillz/trunk/vendor/plugins/can_has_load/lib
-https://hashrocket.svn.beanstalkapp.com/skillz
-
-
-
-2008-04-24T01:49:32.604619Z
-265
-leshill
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-765dc827-1b2f-43c5-b201-8c6ec2a979ac
-
-can_has_load.rb
-file
-
-
-
-
-2008-04-24T19:44:06.000000Z
-7555e6dcf56ee249b977db8176f663e6
-2008-04-24T01:49:32.604619Z
-265
-leshill
-
@@ -1 +0,0 @@
-8
@@ -1,32 +0,0 @@
-# CanHasLoad
-module CanHasLoad
- module CanHasActiveRecord
- def find_by_default_param(id)
- method = self.column_names.include?("slug") ? :find_by_slug : :find_by_id
- send method, id
- end
- end
-
- module CanHasActionController
- private
- def loads(thing, options = {})
- by = options.delete(:by) || :id
- within = options.delete(:within) || nil
- sets = options.delete(:sets) || nil
- optional = options.delete(:optional) || nil
- before_filter(options) { |controller|
- if within
- getter = controller.params[within][by]
- else
- getter = controller.params[by]
- end
- record = thing.to_s.camelize.constantize.find_by_default_param(getter)
- raise ActiveRecord::RecordNotFound.new("Unable to find #{thing} #{getter}") unless record or optional
- controller.instance_variable_set "@#{thing}", record
- if sets
- controller.instance_variable_set "@#{sets}", record.send(sets)
- end
- }
- end
- end
-end
@@ -1,32 +0,0 @@
-# CanHasLoad
-module CanHasLoad
- module CanHasActiveRecord
- def find_by_default_param(id)
- method = self.column_names.include?("slug") ? :find_by_slug : :find_by_id
- send method, id
- end
- end
-
- module CanHasActionController
- private
- def loads(thing, options = {})
- by = options.delete(:by) || :id
- within = options.delete(:within) || nil
- sets = options.delete(:sets) || nil
- optional = options.delete(:optional) || nil
- before_filter(options) { |controller|
- if within
- getter = controller.params[within][by]
- else
- getter = controller.params[by]
- end
- record = thing.to_s.camelize.constantize.find_by_default_param(getter)
- raise ActiveRecord::RecordNotFound.new("Unable to find #{thing} #{getter}") unless record or optional
- controller.instance_variable_set "@#{thing}", record
- if sets
- controller.instance_variable_set "@#{sets}", record.send(sets)
- end
- }
- end
- end
-end
@@ -1,40 +0,0 @@
-8
-
-dir
-316
-https://hashrocket.svn.beanstalkapp.com/skillz/trunk/vendor/plugins/can_has_load/tasks
-https://hashrocket.svn.beanstalkapp.com/skillz
-
-
-
-2008-04-02T18:14:06.650380Z
-102
-ReinH
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-765dc827-1b2f-43c5-b201-8c6ec2a979ac
-
-can_has_load_tasks.rake
-file
-
-
-
-
-2008-04-02T18:14:46.000000Z
-ef9995291e5cee8182f0960c86c50bef
-2008-04-02T18:14:06.650380Z
-102
-ReinH
-
@@ -1 +0,0 @@
-8
@@ -1,4 +0,0 @@
-# desc "Explaining what the task does"
-# task :can_has_load do
-# # Task goes here
-# end
@@ -1,4 +0,0 @@
-# desc "Explaining what the task does"
-# task :can_has_load do
-# # Task goes here
-# end
Oops, something went wrong.

0 comments on commit 54f2501

Please sign in to comment.