view_model:Rails 兼容的视图模型

时间:2021-06-17 09:40:24
【文件属性】:
文件名称:view_model:Rails 兼容的视图模型
文件大小:7KB
文件格式:ZIP
更新时间:2021-06-17 09:40:24
Ruby 视图模型 | | 忽略持久性的 Rails 兼容视图模型。 只是围绕宝石“virtus”和“activemodel”的包装。 安装 将此行添加到应用程序的 Gemfile 中: gem 'view_model' 然后执行: $ bundle 用法 class Profile < ViewModel xss=removed> true end vm = Profile . new ( { :name => 'Bob' } ) vm . valid? # => true vm . attributes # => {:name => 'Bob'}
【文件预览】:
view_model-master
----.gitignore(87B)
----.ruby-gemset(11B)
----bin()
--------setup(115B)
--------console(335B)
----.travis.yml(647B)
----.ruby-version(4B)
----LICENSE(1KB)
----spec()
--------base_spec.rb(1KB)
--------spec_helper.rb(283B)
----README.md(2KB)
----view_models.gemspec(1KB)
----lib()
--------view_model()
--------view_model.rb(77B)
----Gemfile(145B)
----Rakefile(301B)

网友评论