I am now working in this; but stuck somewhere. 

to test - i have added a small line> 
<code>
      context[:stats] = {
                :total => 10
      }
</code>  in <code>hooks.rb</code> 

but it doesn't quite reflect <code>stats</code> as a local variable. throws an error : 

<code> ActionView::Template::Error (undefined local variable or method `stats' for #<#<Class:0xbec3d84>:0xbdc467c>): </code>

If this works, I have understood how to do the rest. Any light you can throw on this?