Temporary Tables Clean Up and Enhancement
Reported by James Herdman | April 11th, 2009 @ 08:44 PM
The create_temporary_table methods can be more useful than they are in their current implementation. Since the generated class is sort of naked, and doesn't act like the "like" class, it's basically useless.
This patch makes the temporary class a descendent of the calling class. Example:
@@@ruby
Account.superclass => ActiveRecord::Base Account.create_temporary_table do |temp_class| * puts temp_class.superclass * end => "Account"
This makes intuitive sense too. If the temporary table is "like" some other table in term of its schema, it should be "like" some other class in terms of its behaviour.
Comments and changes to this ticket
-
James Herdman April 11th, 2009 @ 08:44 PM
- Tag set to tables, temporary
-
Zach Dennis April 21st, 2009 @ 12:58 PM
- Assigned user set to Zach Dennis
James, would you mind testing this out against the latest master? If it applies cleanly for you I'll check it out tonight. Thanks,
-
James Herdman April 21st, 2009 @ 10:11 PM
Sent a pull request tonight from GitHub. This message for completeness of this ticket.
-
James Herdman April 21st, 2009 @ 10:13 PM
I should note that the pull request is slightly different from the originally attached patch. Please use the pull request only.
-
Simple Jack September 22nd, 2020 @ 06:13 AM
I don't know what the codes are all about. I will just comment to wish you all to be safe and healthy, with our current situation and pandemic it is better to stay at home and practice social distancing. The best way to not get bored at home is to play Among Us or PUBG on your computer. Among Us is a survival game that is always trending in Twitter, while PUBG is a online third person shooter battle royale game. Follow this link to play PUBG now!
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
ActiveRecord::Extension (aka ar-extensions) is a plugin to extend and
enhance the functionality of ActiveRecord. It starts by adding better
find support for ActiveRecord. It then adds mass data import
capabilities which are highly efficient and lastly it supports to_csv
functionality.
It also introduces a cool concept of creating easily extendable pieces
of ActiveRecord functionality, so developers don't have to understand
ActiveRecord internals or have the fear of breaking ActiveRecord
itself.