Sha256: 894f3e849bf578e8d5558559a0da0f7509eb97792464e70c23252e190fadd38a
Contents?: true
Size: 462 Bytes
Versions: 10
Compression:
Stored size: 462 Bytes
Contents
module Selections module BelongsToSelection # Helper for belongs_to and accepts all the standard rails options # #Example # belongs_to_selection :priority # # by default adds - class_name: "Selection" def belongs_to_selection(target, options={}) belongs_to target, options.merge(:class_name => "Selection") end ActiveSupport.on_load :active_record do extend Selections::BelongsToSelection end end end
Version data entries
10 entries across 10 versions & 1 rubygems