Commit 66c88f161e6422202e3af94ff6d1176df40cedcc
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branch 'fix_profile_wall' into stable
Showing
4 changed files
with
5 additions
and
4 deletions
Show diff stats
app/helpers/application_helper.rb
@@ -1160,7 +1160,8 @@ module ApplicationHelper | @@ -1160,7 +1160,8 @@ module ApplicationHelper | ||
1160 | end | 1160 | end |
1161 | 1161 | ||
1162 | def expandable_text_area(object_name, method, text_area_id, options = {}) | 1162 | def expandable_text_area(object_name, method, text_area_id, options = {}) |
1163 | - text_area(object_name, method, { :id => text_area_id, :onkeyup => "grow_text_area('#{text_area_id}')" }.merge(options)) | 1163 | + options[:class] = (options[:class] || '') + ' autogrow' |
1164 | + text_area(object_name, method, { :id => text_area_id }.merge(options)) | ||
1164 | end | 1165 | end |
1165 | 1166 | ||
1166 | def pluralize_without_count(count, singular, plural = nil) | 1167 | def pluralize_without_count(count, singular, plural = nil) |
app/mailers/scrap_notifier.rb
app/models/scrap.rb
@@ -25,7 +25,7 @@ class Scrap < ActiveRecord::Base | @@ -25,7 +25,7 @@ class Scrap < ActiveRecord::Base | ||
25 | 25 | ||
26 | after_create do |scrap| | 26 | after_create do |scrap| |
27 | scrap.root.update_attribute('updated_at', DateTime.now) unless scrap.root.nil? | 27 | scrap.root.update_attribute('updated_at', DateTime.now) unless scrap.root.nil? |
28 | - Scrap::Notifier.notification(scrap).deliver if scrap.send_notification? | 28 | + ScrapNotifier.notification(scrap).deliver if scrap.send_notification? |
29 | end | 29 | end |
30 | 30 | ||
31 | before_validation :strip_all_html_tags | 31 | before_validation :strip_all_html_tags |
app/views/profile/_profile_scrap_reply_form.html.erb
1 | <div id='profile-wall-reply-<%= scrap.id%>' style='display:none'> | 1 | <div id='profile-wall-reply-<%= scrap.id%>' style='display:none'> |
2 | <div id='profile-wall-reply-form-<%= scrap.id%>' style='display:none'> | 2 | <div id='profile-wall-reply-form-<%= scrap.id%>' style='display:none'> |
3 | <p class='profile-wall-reply'> | 3 | <p class='profile-wall-reply'> |
4 | - <%= form_remote_tag :url => {:controller => 'profile', :action => 'leave_scrap'}, :update => "profile_activities", :html => { :class => 'profile-wall-reply-form'} do %> | 4 | + <%= form_remote_tag :url => {:controller => 'profile', :action => 'leave_scrap'}, :update => "profile_activities", :html => { :class => 'profile-wall-reply-form', 'data-update' => 'profile_activities'} do %> |
5 | <%= expandable_text_area :scrap, | 5 | <%= expandable_text_area :scrap, |
6 | :content, | 6 | :content, |
7 | "reply_content_#{scrap.id}", | 7 | "reply_content_#{scrap.id}", |