【文件属性】:
文件名称:sneaky-save:允许更新复杂的对象而无需触发验证或回调
文件大小:7KB
文件格式:ZIP
更新时间:2021-05-10 19:14:13
Ruby
偷偷摸摸的保存
ActiveRecord扩展名。 允许保存记录而无需调用回调和验证。
正在安装
$ gem install sneaky-save
或放入您的gemfile以获取最新版本:
gem 'sneaky-save' , git : 'git://github.com/einzige/sneaky-save.git'
使用
# Update. Returns true on success, false otherwise.
existing_record . sneaky_save
# Insert. Returns true on success, false otherwise.
Model . new . sneaky_save
# Raise exception on failure.
record . sneaky_save!
运行规格
克隆仓库
运行bundle
【文件预览】:
sneaky-save-master
----.travis.yml(381B)
----sneaky-save.gemspec(751B)
----Rakefile(104B)
----gemfiles()
--------rails_3_2(98B)
--------rails_5(99B)
--------rails_4(99B)
----Gemfile(87B)
----VERSION(6B)
----spec()
--------lib()
--------spec_helper.rb(827B)
----.gitignore(218B)
----lib()
--------sneaky-save.rb(3KB)
----README.md(1KB)