In my controller I have:
def sedomain
country_codes = %w[ dk se com net org info ]
@domains = { }
country_codes.each do |cc|
@domains[cc.to_sym] = { :navn => ".#{cc}" }
end
render :layout => 'page'
end
dk se com net org info are columns in my domains table.
I want to count how many that are not blank
I have tried something like this:
def sedomain
country_codes = %w[ dk se com net org info ]
@domains = { }
country_codes.each do |cc|
@domains[cc.to_sym] = { :navn => ".#{cc}", :count => Domain.#{cc}.count }
end
render :layout => 'page'
end
But I get a nomethod error.
or