Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Sequel 中制作了一个表格视图,并将其放入一个文件中db_views.rb:
db_views.rb
require 'db_manip' Db_manip::DB.create_view(:bn_view,'SELECT ...')
为了遵循“胖模型瘦控制器”的做法,我想为:bn_view.
:bn_view
你有没有尝试过:
class BnView < Sequel::Model(:bn_view) def foo # implement your method here end end