ext_sti:通过关联继承扩展 Ruby on Rails STI

时间:2021-06-20 02:52:11
【文件属性】:
文件名称:ext_sti:通过关联继承扩展 Ruby on Rails STI
文件大小:6KB
文件格式:ZIP
更新时间:2021-06-20 02:52:11
Ruby 外部STI 通过关联使用继承扩展 STI。 用法 宝石档案: gem 'ext_sti', :git => 'git://github.com/fuCtor/ext_sti.git' 楷模: class Post < ActiveRecord xss=removed> PostType, :foreign_key => :post_type_id, :field_name => :name do |type| "#{type}Post" end end class ForumPost < Post attr_accessible :name ati_type :forum end class Blo
【文件预览】:
ext_sti-master
----Rakefile(28B)
----Gemfile(186B)
----.project(435B)
----.gitignore(184B)
----lib()
--------ext_sti()
--------ext_sti.rb(176B)
----README.md(887B)
----MIT-LICENSE(1KB)
----ext_sti.gemspec(672B)

网友评论