Initially, I import the data into a datatype Hash , since I have a column called schedule, I need the type of the specific βscheduleβ column from my db. my verified code
schedule = scheduleWorld.all schedule.each do |sec| sec.attributes.each do |key, value, type| puts "%%%%%%%%%%%%%%%%%%%%%%%%%" puts key puts value puts type puts "%%%%%%%%%%%%%%%%%%%%%%%%%" end end
To this, I get null in the type, I tried another code
schedule = scheduleWorld.where({schedule:{$type=>2}})
error
undefined method `specify' for nil:NilClass (eval):2:in `where'
Anyone have an idea about this?
source share