class Configuration < ActiveRecord::Base belongs_to :user def to_hash { 'hidden_ids' => self.ngid.split(/\r\n|\r|\n|\|/), 'hidden_keywords' => self.ngkeyword.split(/\r\n|\r|\n/), 'hidden_words' => self.ngword.split(/\r\n|\r|\n/) } end end