Commit 66c88f161e6422202e3af94ff6d1176df40cedcc

Authored by Victor Costa
2 parents 1cd31972 4ba820dd

Merge branch 'fix_profile_wall' into stable

app/helpers/application_helper.rb
... ... @@ -1160,7 +1160,8 @@ module ApplicationHelper
1160 1160 end
1161 1161  
1162 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 1165 end
1165 1166  
1166 1167 def pluralize_without_count(count, singular, plural = nil)
... ...
app/mailers/scrap_notifier.rb
1   -class Scrap::Notifier < ActionMailer::Base
  1 +class ScrapNotifier < ActionMailer::Base
2 2 def notification(scrap)
3 3 sender, receiver = scrap.sender, scrap.receiver
4 4 @recipient = receiver.name
... ...
app/models/scrap.rb
... ... @@ -25,7 +25,7 @@ class Scrap &lt; ActiveRecord::Base
25 25  
26 26 after_create do |scrap|
27 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 29 end
30 30  
31 31 before_validation :strip_all_html_tags
... ...
app/views/profile/_profile_scrap_reply_form.html.erb
1 1 <div id='profile-wall-reply-<%= scrap.id%>' style='display:none'>
2 2 <div id='profile-wall-reply-form-<%= scrap.id%>' style='display:none'>
3 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 5 <%= expandable_text_area :scrap,
6 6 :content,
7 7 "reply_content_#{scrap.id}",
... ...