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.
16 lines
625 B
16 lines
625 B
6 years ago
|
class OptionNumber < ActiveRecord::Base
|
||
|
attr_accessible :attachment, :changeset, :document, :follow, :issue_done_ratio, :issues_status, :memo, :messages_for_issues, :post_issue,
|
||
|
:praise_by_one, :praise_by_three, :praise_by_two, :replay_for_memo, :replay_for_message, :score_type, :total_score, :tread, :tread_by_one, :tread_by_three, :tread_by_two, :user_id
|
||
|
|
||
|
def self.get_user_option_number user_id
|
||
|
result = nil
|
||
|
unless user_id.nil?
|
||
|
ons = OptionNumber.find_all_by_user_id(user_id);
|
||
|
unless (ons .nil? && ons.count > 0)
|
||
|
result = ons.first
|
||
|
end
|
||
|
end
|
||
|
result
|
||
|
end
|
||
|
end
|