Created
October 15, 2010 16:02
-
-
Save wmoxam/628440 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## app/models/legacy/article.rb [ruby_on_rails] | |
class Legacy::Node < Legacy::Base | |
set_table_name 'node' | |
set_inheritance_column :node_type | |
set_primary_key :nid | |
default_scope select("*, concat('Legacy::', IF(type = 'ic_article', 'Article', IF(type = 'ic_video', 'Video', concat(UPPER(SUBSTRING(type, 1, 1)), LOWER(SUBSTRING(type, 2)))))) as node_type") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment