diff --git a/app/controllers/public/profile_controller.rb b/app/controllers/public/profile_controller.rb index 8e2b061..e25277b 100644 --- a/app/controllers/public/profile_controller.rb +++ b/app/controllers/public/profile_controller.rb @@ -179,7 +179,7 @@ class ProfileController < PublicController @tab_action = params[:tab_action] @message = @scrap.save ? _("Message successfully sent.") : _("You can't leave an empty message.") @activities = @profile.activities.paginate(:per_page => 30, :page => params[:page]) if params[:not_load_scraps].nil? - render :partial => 'leave_scrap' + render :partial => 'profile_activities_list' end def leave_comment_on_activity @@ -192,7 +192,7 @@ class ProfileController < PublicController @tab_action = params[:tab_action] @message = @comment.save ? _("Comment successfully added.") : _("You can't leave an empty comment.") @activities = @profile.activities.paginate(:per_page => 30, :page => params[:page]) if params[:not_load_scraps].nil? - render :partial => 'leave_comment_on_activity' + render :partial => 'profile_activities_list' end def view_more_scraps diff --git a/app/views/profile/_profile_activity.rhtml b/app/views/profile/_profile_activity.rhtml index 034ab32..bccdbd9 100644 --- a/app/views/profile/_profile_activity.rhtml +++ b/app/views/profile/_profile_activity.rhtml @@ -3,7 +3,7 @@
- <% form_tag :url => {:controller => 'profile', :action => 'leave_comment_on_activity'}, :update => 'profile_activities' do %> + <% form_remote_tag :url => {:controller => 'profile', :action => 'leave_comment_on_activity'}, :update => 'profile_activities' do %> <%= text_area :comment, :body, {:id => "reply_content_#{activity.id}", :cols => 50, :rows => 1, :class => 'submit-with-keypress'} %> <%= hidden_field_tag :source_id, activity.id, :id => "activity_id_#{activity.id}" %> <% end %> diff --git a/app/views/profile/_profile_scrap.rhtml b/app/views/profile/_profile_scrap.rhtml index ae8e06b..4cb556a 100644 --- a/app/views/profile/_profile_scrap.rhtml +++ b/app/views/profile/_profile_scrap.rhtml @@ -10,8 +10,8 @@
<%= txt2html scrap.content %>
<%= time_ago_as_sentence(scrap.created_at) + ' ' + _('ago') %>