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.
19 lines
382 B
19 lines
382 B
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
|