Skip to content

Commit

Permalink
New comment created if needed inside partial.
Browse files Browse the repository at this point in the history
  • Loading branch information
steveyken committed Dec 14, 2012
1 parent c675d75 commit 81a8e7e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions app/views/comments/_new.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- class_name = commentable.class.name.underscore
- id_prefix = "#{class_name}_#{commentable.id}"
- @comment = @comment || Comment.new
.comment.highlight.new_comment{ :id => "#{id_prefix}_comment_new" }
- subscribed_users = commentable.subscribed_users.map{|uid| User.find_by_id(uid) unless uid == current_user.id }.compact
- if notification_emails_configured? && subscribed_users.any?
Expand Down
1 change: 0 additions & 1 deletion app/views/contacts/_index_full.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,5 @@
= render "contacts/section_general", :contact => contact
= render "contacts/section_extra", :contact => contact
= render "entities/section_custom_fields", :entity => contact
- @comment = Comment.new
= render "comments/new", :commentable => contact
= render :partial => "shared/timeline", :collection => (contact.comments + contact.emails).sort { |x, y| y.created_at <=> x.created_at }

0 comments on commit 81a8e7e

Please sign in to comment.