On 9 March 2015 at 11:52, Sailatha Kashamoni
<sailatha.kashamoni....@gmail.com> wrote:
>
>
>
>
> app/assets/javascripts/blog/show.js.erb:
>
>
>          $(document).ready(logView);
>                 function logView() {
> var id = $('div.blog_post').data('id');
> InternalAnalytics.postEvent(id, 'view');
>         }
> app/views/blog/show.html.erb:
>
>
>                    <div class='column'>
> <div class='column top'>
> <a class='icon_text_button' href="javascript:;">
> <span class='icon'>
> &#59146;
> </span>
> <span class='text'>
> <%= @blog_post.view_count %>
> </span>
> </a>
>
>    app/models/atom.rb:
>
>                                         def count_view!
>                                           self.inc(:view_count, 1)
>                                           self.update_index
>                                               end
>
>
> app\views\home\index\_report.html.erb:
>
>
>
> <div class='buttons'>
> <a class='icon_text_button' href='<%= research_article_path(:url_fragment =>
> atom.url_fragment) %>'>
> <span class='icon'>
> &#59146;
> </span>
> <span class='text'>
> <%= abbreviated_number(atom.view_count) %> <%= atom.view_count == 1 ? 'view'
> : 'views' %>
> </span>
> </a>

I don't see a question there.

Assuming you have some sort of problem with the code then first look
at the logs, debug the code to find where the problem is, use
something like firebug to check the javascript is ok, and then if
something is not working as you expect ask a specific question.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLswwBjCQyntv%2Bue9z5vyg6P7nSSCMGJxeHFrLRbRKW6tQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to