Skip to content
Browse files

Fix the widget makes a request with wrong parameters

  • Loading branch information...
1 parent e2b3f86 commit 9879c91028101dae15201bf4d20df6f36c57ff8b @kyungbae kyungbae committed Jul 29, 2013
Showing with 6 additions and 6 deletions.
  1. +3 −3 views/item.erb
  2. +3 −3 views/view_helpers.rb
View
6 views/item.erb
@@ -283,21 +283,21 @@
$('#discussion')
.append(
'<a href='
- + "<%= construct_user_platform_url('discussion', 'list', "#{@object.accession_number}")%>"
+ + "<%= construct_user_platform_url('Discussion', 'list', "#{@object.accession_number}")%>"
+ ' class="description">Discussions: '
+ data['Discussion']
+ '</a>');
$('#question')
.append(
'<a href='
- + "<%= construct_user_platform_url('question', 'list', "#{@object.accession_number}")%>"
+ + "<%= construct_user_platform_url('Question', 'list', "#{@object.accession_number}")%>"
+ ' class="description">Questions: '
+ data['Question']
+ '</a>');
$('#research')
.append(
'<a href='
- + "<%= construct_user_platform_url('research', 'list', "#{@object.accession_number}")%>"
+ + "<%= construct_user_platform_url('Research', 'list', "#{@object.accession_number}")%>"
+ ' class="description">Researches: '
+ data['Research']
+ '</a>');
View
6 views/view_helpers.rb
@@ -129,11 +129,11 @@ def construct_user_platform_url(type, action, accession_number)
# Append a controller
case type
- when 'research'
+ when 'Research'
url << '/researches'
- when 'discussion'
+ when 'Discussion'
url << '/threads'
- when 'question'
+ when 'Question'
url << '/threads'
else
url << '/contributions'

0 comments on commit 9879c91

Please sign in to comment.
Something went wrong with that request. Please try again.