This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 39bdcad1c20a08eb9b16552a5aa40d3ccb697191
tree 676853fb4208c805a6ad4ecc7a3ff0c1063671d4
parent 77702954f51721a6cb8219b3c31fd73eebaa1045
tree 676853fb4208c805a6ad4ecc7a3ff0c1063671d4
parent 77702954f51721a6cb8219b3c31fd73eebaa1045
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | Wed Sep 10 02:53:09 -0700 2008 | |
| |
README.textile | Wed Sep 10 02:53:09 -0700 2008 | |
| |
Rakefile | Wed Sep 10 02:53:09 -0700 2008 | |
| |
init.rb | ||
| |
install.rb | Wed Sep 10 02:53:09 -0700 2008 | |
| |
lib/ | Thu Sep 11 04:33:56 -0700 2008 | |
| |
spec/ | ||
| |
tasks/ | Wed Sep 10 02:53:09 -0700 2008 | |
| |
uninstall.rb | Wed Sep 10 02:53:09 -0700 2008 |
Delegate Temporal
This Rails plugin allows you to continue to use multiparameter attributes when the actual attribute is delegated to another object.
The problem
class Foo < ActiveRecord::Base
...
delegate :start_time, :start_time=, :to => :appointment
end
@foo.attributes = { "start_time(1i)" => "2008", "start_time(2i)" => "9", ... }
# => Error!
The error occurs because Rails tries to look up the “start_time” column in the database (in order to find out information about its type), but because we are delegating it doesn’t exist.
The solution
Install this plugin, and then:
class Foo < ActiveRecord::Base
...
delegate_temporal :start_time, :to => :appointment
end
@foo.attributes = { "start_time(1i)" => "2008", "start_time(2i)" => "9", ... }
# => Yay, it works!











