You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgfqe6ch8/app/models/secdomain.rb

19 lines
382 B

6 years ago
class Secdomain < ActiveRecord::Base
attr_accessible :pid, :subname, :sub_type, :desc
validates_presence_of :subname, :sub_type
validates_uniqueness_of :subname
def controller
return 'organizations' if sub_type == 2
return 'users' if sub_type == 3
nil
end
def action
return 'show' if sub_type == 2
return 'show' if sub_type == 3
nil
end
end