Feature #31427 » 0001-Fix-missing-journal-indice-when-updating-a-journal.patch
| app/helpers/journals_helper.rb | ||
|---|---|---|
|
links = []
|
||
|
if journal.notes.present?
|
||
|
if options[:reply_links]
|
||
|
indice = journal.indice || @journal.issue.visible_journals_with_index.find{|j| j.id == @journal.id}.indice
|
||
|
links << link_to(l(:button_quote),
|
||
|
quoted_issue_path(issue, :journal_id => journal, :journal_indice => journal.indice),
|
||
|
quoted_issue_path(issue, :journal_id => journal, :journal_indice => indice),
|
||
|
:remote => true,
|
||
|
:method => 'post',
|
||
|
:title => l(:button_quote),
|
||
| test/functional/journals_controller_test.rb | ||
|---|---|---|
|
assert_equal 'text/javascript', response.content_type
|
||
|
assert_equal 'Updated notes', Journal.find(2).notes
|
||
|
assert_include 'journal-2-notes', response.body
|
||
|
# response should include journal_indice param for quote link
|
||
|
assert_include 'journal_indice=2', response.body
|
||
|
end
|
||
|
def test_update_xhr_with_private_notes_checked
|
||
- « Previous
- 1
- …
- 3
- 4
- 5
- Next »