Merge Request #9

Merged
noosferogov/noosfero!9
Created by Carlos Purificação

Export comment paragraph rails3

Added paragraph id and comment_reply_to. Moved changes from Rails 4 to 3

Assignee: None
Milestone: 2016.03

Merged by Victor Costa

Source branch has been removed
Commits (49)
2 participants
    4a20548511a65cfccc863520b70c3ee9?s=40&d=identicon
    Victor Costa started a discussion on commit a86306b1
    last updated by Michel Felipe
    app/models/article.rb
    842 850 sanitizer.sanitize(text)
    843 851 end
    844 852  
      853 + def parent_archived?
      854 + if (self.old_parent_id != self.parent_id) && self.parent && self.parent.archived?
    2
    • 4a20548511a65cfccc863520b70c3ee9?s=40&d=identicon
      Victor Costa @vfcosta

      You should use self.parent_id_changed? to verify if the parent_id was changed.

      Choose File ...   File name...
      Cancel
    • Me
      Michel Felipe @mfdeveloper (Edited )

      This Rails feature attribute_changed? is pretty awesome @vfcosta !! Many thanks to share this with me :) I had no idea about this behavior. After your response, I made a research about this and I found it like ActiveModel::Dirty, where you can use changed_attributes to check more than one model attribute!

      I made this changes in the same last commit and forced update. Please, verify now if everything it's ok!!

      Choose File ...   File name...
      Cancel
    4a20548511a65cfccc863520b70c3ee9?s=40&d=identicon
    Victor Costa started a discussion on commit a86306b1
    last updated by Victor Costa
    app/controllers/my_profile/cms_controller.rb
    99 99 @article.image.save!
    100 100 end
    101 101 @article.last_changed_by = user
      102 + @article.old_parent_id = @article.parent_id
    1
    4a20548511a65cfccc863520b70c3ee9?s=40&d=identicon
    Victor Costa started a discussion on commit a86306b1
    last updated by Victor Costa
  • 4a20548511a65cfccc863520b70c3ee9?s=40&d=identicon
    Victor Costa @vfcosta
    Choose File ...   File name...
    Cancel
  • 4a20548511a65cfccc863520b70c3ee9?s=40&d=identicon
    Victor Costa started a discussion on commit a86306b1
    last updated by Victor Costa
    app/models/article.rb
    9 9 :highlighted, :notify_comments, :display_hits, :slug,
    10 10 :external_feed_builder, :display_versions, :external_link,
    11 11 :image_builder, :show_to_followers,
    12   - :author, :display_preview
      12 + :author, :display_preview, :archived
      13 +
      14 + attr_accessor :old_parent_id
    1
  • 2c5c4299d62769e3da7d432cd2823dd6?s=40&d=identicon
    Carlos Purificação @carloseugenio

    Added 1 new commit:

    • e5407b4a - Added export comments to comment_group_plugin
    Choose File ...   File name...
    Cancel
  • 4a20548511a65cfccc863520b70c3ee9?s=40&d=identicon
    Victor Costa @vfcosta

    Added 2 new commits:

    • 0f801692 - comment_paragraph: display export button only when activated
    • b1ce9803 - comment_group: export comments
    Choose File ...   File name...
    Cancel