metamaps--metamaps/app/models/user_preference.rb
2016-09-18 15:22:51 +00:00

13 lines
326 B
Ruby

class UserPreference
attr_accessor :metacodes, :metacode_focus
def initialize
array = []
%w(Action Aim Idea Question Note Wildcard Subject).each do |m|
metacode = Metacode.find_by_name(m)
array.push(metacode.id.to_s) if metacode
end
@metacodes = array
@metacode_focus = array[0]
end
end