exceptionHandle
nwb 11 years ago
commit b736dc91ed

@ -277,9 +277,18 @@ class AccountController < ApplicationController
end end
call_hook(:controller_account_success_authentication_after, {:user => user }) call_hook(:controller_account_success_authentication_after, {:user => user })
#by young #by young
# redirect_back_or_default my_page_path code = //
#根据home_url生产正则表达式
class_eval("code = " + "/" + home_url.gsub(/\//,"\\\/") + "\\\/*(welcome)?\\\/*(\\\/index)?\/")
if code.match(params[:back_url])
redirect_to user_activities_path(user)
else
#redirect_back_or_default my_page_path
redirect_back_or_default User.current redirect_back_or_default User.current
# redirect_to User.current #redirect_to User.current
end
end end
def set_autologin_cookie(user) def set_autologin_cookie(user)

@ -65,7 +65,7 @@
<% pages_count = @reply_pages.offset %> <% pages_count = @reply_pages.offset %>
<% @replies.each do |reply| %> <% @replies.each do |reply| %>
<div class="reply" id="<%= "reply-#{reply.id}" %>"> <div class="reply" id="<%= "reply-#{reply.id}" %>">
<p class="font_lighter"><span style="display: none"><%= pages_count += 1 %>楼 :</span></p> <p class="font_lighter"><!--<span style="display: inline"><%= pages_count += 1 %>楼 :</span>--></p>
<div class="contextual-borad"> <div class="contextual-borad">
<!-- <%= link_to( <!-- <%= link_to(
image_tag('comment.png'), image_tag('comment.png'),
@ -103,7 +103,7 @@
) if reply.destroyable_by?(User.current) %> ) if reply.destroyable_by?(User.current) %>
</div> </div>
<br/>
<table class="borad-text-list"> <table class="borad-text-list">
<tr> <tr>
<td rowspan="3" valign="top" width="60px"> <td rowspan="3" valign="top" width="60px">

@ -124,7 +124,8 @@
<table class="borad-text-list"> <table class="borad-text-list">
<tr> <tr>
<td class="font_lighter"><span style="display: none"><%= reply_count += 1 %>楼</span> </td> <!--<td class="font_lighter"> </td> -->
<td rowspan="3" valign="top" width="60px"><%= link_to image_tag(url_to_avatar(message.author), :class => "avatar"), user_path(message.author) %></td>
<td> <td>
<div class="contextual-borad"> <div class="contextual-borad">
<%= link_to( <%= link_to(
@ -150,7 +151,7 @@
</div></td> </div></td>
</tr> </tr>
<tr> <tr>
<td rowspan="3" valign="top" width="60px"><%= link_to image_tag(url_to_avatar(message.author), :class => "avatar"), user_path(message.author) %></td>
<td class="comments"> <td class="comments">
<div class="wiki"> <div class="wiki">
<%= textilizable message, :content, :attachments => message.attachments %> <%= textilizable message, :content, :attachments => message.attachments %>

Loading…
Cancel
Save