Fix url encode and rescue in _profile.html.erb
This commit is contained in:
parent
60fbc344d1
commit
363ef493bd
|
@ -17,7 +17,7 @@ class Admin::PatentsController < OrbitMemberController
|
||||||
@member = MemberProfile.find(patent_params['member_profile_id']) rescue nil
|
@member = MemberProfile.find(patent_params['member_profile_id']) rescue nil
|
||||||
@patent = Patent.new(patent_params)
|
@patent = Patent.new(patent_params)
|
||||||
@patent.save
|
@patent.save
|
||||||
redirect_to '/admin/members/'+@member.to_param+'/Patent'
|
redirect_to URI.encode('/admin/members/'+@member.to_param+'/Patent')
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
|
@ -30,7 +30,7 @@ class Admin::PatentsController < OrbitMemberController
|
||||||
@patent = Patent.find(params[:id])
|
@patent = Patent.find(params[:id])
|
||||||
@patent.update_attributes(patent_params)
|
@patent.update_attributes(patent_params)
|
||||||
@patent.save
|
@patent.save
|
||||||
redirect_to '/admin/members/'+@member.to_param+'/Patent'
|
redirect_to URI.encode('/admin/members/'+@member.to_param+'/Patent')
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
|
@ -66,7 +66,7 @@ class Admin::PatentsController < OrbitMemberController
|
||||||
@intro = @intro.nil? ? PatentIntro.new({:member_profile_id=>@member.id}) : @intro
|
@intro = @intro.nil? ? PatentIntro.new({:member_profile_id=>@member.id}) : @intro
|
||||||
@intro.update_attributes(intro_params)
|
@intro.update_attributes(intro_params)
|
||||||
@intro.save
|
@intro.save
|
||||||
redirect_to '/admin/members/'+@member.to_param+'/Patent'
|
redirect_to URI.encode('/admin/members/'+@member.to_param+'/Patent')
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_settings
|
def get_settings
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
<%= check_box_tag 'to_change[]', patent.id.to_s, false, :class => "list-check" %>
|
<%= check_box_tag 'to_change[]', patent.id.to_s, false, :class => "list-check" %>
|
||||||
</td>
|
</td>
|
||||||
<% end %>
|
<% end %>
|
||||||
<td><%= patent.publish_date.strftime("%Y.%m") %></td>
|
<td><%= (patent.publish_date.strftime("%Y.%m") rescue "") %></td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to patent.patent_title, OrbitHelper.url_to_plugin_show(patent.to_param,'personal_patent').to_s, target: "blank"%>
|
<%= link_to patent.patent_title, OrbitHelper.url_to_plugin_show(patent.to_param,'personal_patent').to_s, target: "blank"%>
|
||||||
<div class="quick-edit">
|
<div class="quick-edit">
|
||||||
|
|
Loading…
Reference in New Issue