Sha256: 64317ec1840714f58a36142b2a8c694b06a18ba566ec06ffda2aca5e91c0556b
Contents?: true
Size: 628 Bytes
Versions: 13
Compression:
Stored size: 628 Bytes
Contents
require 'action_view/helpers/auto_tag_helper/form_info' require 'activerecord/mlang' class OrgDirectorType < ActiveRecord::Base belongs_to :org has_many :directors, class_name: "OrgMember" include ActiveRecord::Mlang include ActionView::Helpers::AutoTagHelper::FormInfo set_accessible_attrs :position, :limit validates :limit, length: {minimum: 1} set_input_options :limit, min: 0 validates :position, length: {minimum: 0} set_input_options :position, min: 0 def <=>(other) self.position <=> (other.try(:position) || self.position + 1) end def __display__ self.text.try(:label).to_s end end
Version data entries
13 entries across 13 versions & 1 rubygems