forked from saurabh/personal-research
Fix url encode and rescue publish_date in _profile.html.erb
This commit is contained in:
parent
8c4c54dcc0
commit
ecf3e35d1e
|
@ -17,7 +17,7 @@ class Admin::ResearchsController < OrbitMemberController
|
|||
@member = MemberProfile.find(research_params['member_profile_id']) rescue nil
|
||||
@research = Research.new(research_params)
|
||||
@research.save
|
||||
redirect_to '/admin/members/'+@member.to_param+'/Research'
|
||||
redirect_to URI.encode('/admin/members/'+@member.to_param+'/Research')
|
||||
end
|
||||
|
||||
def edit
|
||||
|
@ -30,7 +30,7 @@ class Admin::ResearchsController < OrbitMemberController
|
|||
@research = Research.find(params[:id])
|
||||
@research.update_attributes(research_params)
|
||||
@research.save
|
||||
redirect_to '/admin/members/'+@member.to_param+'/Research'
|
||||
redirect_to URI.encode('/admin/members/'+@member.to_param+'/Research')
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
@ -66,7 +66,7 @@ class Admin::ResearchsController < OrbitMemberController
|
|||
@intro = @intro.nil? ? ResearchIntro.new({:member_profile_id=>@member.id}) : @intro
|
||||
@intro.update_attributes(intro_params)
|
||||
@intro.save
|
||||
redirect_to '/admin/members/'+@member.to_param+'/Research'
|
||||
redirect_to URI.encode('/admin/members/'+@member.to_param+'/Research')
|
||||
end
|
||||
|
||||
def get_settings
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
</td>
|
||||
<% end %>
|
||||
<td><%= research.year %></td>
|
||||
<td><%= research.publish_date.strftime("%Y.%m") %></td>
|
||||
<td><%= research.publish_date.strftime("%Y.%m") rescue "" %></td>
|
||||
<td>
|
||||
<%= link_to research.research_title, OrbitHelper.url_to_plugin_show(research.to_param,'personal_research'), target: "blank"%>
|
||||
<div class="quick-edit">
|
||||
|
|
Loading…
Reference in New Issue