Sha256: 6e351b40a20e9f3740a4b0de1d6e9893d3529eef2a0212ad2a43d1fd53bc27c9
Contents?: true
Size: 403 Bytes
Versions: 2
Compression:
Stored size: 403 Bytes
Contents
# Makes certain AR Model methods available to the view model. # # Useful when the model is an AR Model. # module ViewModels module Extensions module ActiveRecord delegate :id, :to_param, :to => :model # Delegate to the action controller record identifier. # def dom_id ActionController::RecordIdentifier.dom_id model end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
view_models-1.5.3 | lib/extensions/active_record.rb |
view_models-1.5.2 | lib/extensions/active_record.rb |