From 7e9095eff2f68b7c732e0f3bac3f5ece3a1c46f4 Mon Sep 17 00:00:00 2001 From: Larissa Reis Date: Wed, 28 Oct 2015 15:00:37 -0300 Subject: [PATCH] Fixes crash in tracker notification about product --- app/helpers/action_tracker_helper.rb | 6 +++--- app/views/profile/_create_product.html.erb | 2 +- app/views/profile/_favorite_enterprise.html.erb | 2 +- app/views/profile/_remove_product.html.erb | 2 +- app/views/profile/_update_product.html.erb | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/helpers/action_tracker_helper.rb b/app/helpers/action_tracker_helper.rb index e6f8a66..7d13a5b 100644 --- a/app/helpers/action_tracker_helper.rb +++ b/app/helpers/action_tracker_helper.rb @@ -67,19 +67,19 @@ module ActionTrackerHelper } end - def create_product_description + def create_product_description ta _('created the product %{title}') % { title: link_to(truncate(ta.get_name), ta.get_url), } end - def update_product_description + def update_product_description ta _('updated the product %{title}') % { title: link_to(truncate(ta.get_name), ta.get_url), } end - def remove_product_description + def remove_product_description ta _('removed the product %{title}') % { title: truncate(ta.get_name), } diff --git a/app/views/profile/_create_product.html.erb b/app/views/profile/_create_product.html.erb index d7021d3..094309f 100644 --- a/app/views/profile/_create_product.html.erb +++ b/app/views/profile/_create_product.html.erb @@ -3,7 +3,7 @@

<%= link_to activity.user.short_name(nil), activity.user.url %> <%= describe activity %>

-

<%= time_ago_as_sentence activity.created_at %>

+

<%= time_ago_in_words activity.created_at %>

<%= link_to_function(_('Remove'), 'remove_item_wall(this, \'%s\', \'%s\', \'%s\'); return false ;' % [".profile-activity-item", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :view => params[:view]), _('Are you sure you want to remove this activity and all its replies?')]) if logged_in? && current_person == @profile %> diff --git a/app/views/profile/_favorite_enterprise.html.erb b/app/views/profile/_favorite_enterprise.html.erb index 16ae381..185aa3a 100644 --- a/app/views/profile/_favorite_enterprise.html.erb +++ b/app/views/profile/_favorite_enterprise.html.erb @@ -5,7 +5,7 @@

<%= link_to activity.user.short_name(nil), activity.user.url %> <%= describe activity %>

-

<%= time_ago_as_sentence activity.created_at %>

+

<%= time_ago_in_words activity.created_at %>

<%= link_to_function(_('Remove'), 'remove_item_wall(this, \'%s\', \'%s\', \'%s\'); return false ;' % [".profile-activity-item", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :view => params[:view]), _('Are you sure you want to remove this activity and all its replies?')]) if logged_in? && current_person == @profile %> diff --git a/app/views/profile/_remove_product.html.erb b/app/views/profile/_remove_product.html.erb index 0ddb381..1fb0afa 100644 --- a/app/views/profile/_remove_product.html.erb +++ b/app/views/profile/_remove_product.html.erb @@ -2,7 +2,7 @@

<%= link_to activity.user.short_name(nil), activity.user.url %> <%= describe activity %>

-

<%= time_ago_as_sentence activity.created_at %>

+

<%= time_ago_in_words activity.created_at %>

<%= link_to_function(_('Remove'), 'remove_item_wall(this, \'%s\', \'%s\', \'%s\'); return false ;' % [".profile-activity-item", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :view => params[:view]), _('Are you sure you want to remove this activity and all its replies?')]) if logged_in? && current_person == @profile %> diff --git a/app/views/profile/_update_product.html.erb b/app/views/profile/_update_product.html.erb index d7021d3..094309f 100644 --- a/app/views/profile/_update_product.html.erb +++ b/app/views/profile/_update_product.html.erb @@ -3,7 +3,7 @@

<%= link_to activity.user.short_name(nil), activity.user.url %> <%= describe activity %>

-

<%= time_ago_as_sentence activity.created_at %>

+

<%= time_ago_in_words activity.created_at %>

<%= link_to_function(_('Remove'), 'remove_item_wall(this, \'%s\', \'%s\', \'%s\'); return false ;' % [".profile-activity-item", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :view => params[:view]), _('Are you sure you want to remove this activity and all its replies?')]) if logged_in? && current_person == @profile %> -- libgit2 0.21.2