【文件属性】:
文件名称:activerecord-commentator:将caller_location(文件名,行号和方法名)添加为SQL注释
文件大小:7KB
文件格式:ZIP
更新时间:2021-05-21 13:26:34
Ruby
ActiveRecord :: Commentator
ActiveRecord :: Commentator将caller_location (文件名,行号和方法名)添加为调用SQL语句SQL注释。
安装
将此行添加到您的应用程序的Gemfile中:
gem 'activerecord-commentator'
然后执行:
$ bundle
或将其自己安装为:
$ gem install activerecord-commentator
用法
在Rails应用中
# in config/initializers/commentator.rb
require "active_record/commentator"
ActiveRecord :: Commentator :: Configuration . paths = [
/ #{ Rails . root . j
【文件预览】:
activerecord-commentator-master
----.travis.yml(76B)
----bin()
--------console(350B)
--------setup(115B)
----Rakefile(117B)
----Gemfile(110B)
----.rspec(31B)
----spec()
--------active_record()
--------spec_helper.rb(208B)
----.gitignore(87B)
----lib()
--------active_record()
----README.md(2KB)
----activerecord-commentator.gemspec(1KB)