app/models/minute.rb
# Replace action-item number into corresponding GitHub issue number.
# Example:
#   "-->(name !:0001)" becomes "-->(name nomlab/jay/#10)"
Replace action-item number into corresponding GitHub issue number.
Replace action - item number into corresponding GitHub issue number .
def cooked_content
    self.read_attribute(:content).split("\n").map do |line|
      line.gsub(/-->\((.+?)!:([0-9]{4})\)/) do |macth|
        assignee, action = $1.strip, $2
        issue = ActionItem.find_by_id(action.to_i).try(:github_issue)
        issue ? "-->(#{assignee} #{issue}{:data-action-item=\"#{action}\"})" :
          "-->(#{assignee} !:#{action})"
      end
    end.join("\n")
  end
def cooked_content self . read_attribute ( :content ) . split ( "\n" ) . map do | line | line . gsub ( / --> \( (.+?)!:([0-9]{4}) \) / ) do | macth | assignee , action = $1 . strip , $2 issue = ActionItem . find_by_id ( action . to_i ) . try ( :github_issue ) issue ? "-->(#{assignee} #{issue}{:data-action-item=\"#{action}\"})" : "-->(#{assignee} !:#{action})" end end . join ( "\n" ) end
Replace action-item number into corresponding GitHub issue number.
Replace action - item number into corresponding GitHub issue number .