i am new to ruby and nanoc. I am trying to sort articles based on time. So I get more accurate results on my blog.
This is what I am using in my sorted_articles_time.rb
file under /helpers/
def sorted_articles_time
articles.sort_by do |a|
attribute_to_time(a[:time])
end.reverse
end
But then I get the error
NoMethodError: private method `sorted_articles_time' called for #<Nanoc::Site:0x007fd93b0a3f40>
What am I doing wrong ? And is there a way to overwrite the existing sorted_articles method ?
Thanks
UPDATE: I already have it initiated in the rake file. So I think my rake file is fine here.
time1 = Time.new
@time = time1.inspect