else
@user.preferences.create(:k => "diary.default_language", :v => @diary_entry.language_code)
end
- redirect_to :controller => "diary_entry", :action => "list", :display_name => @user.display_name
+ redirect_to :action => "list", :display_name => @user.display_name
else
render :action => "edit"
end
@diary_entry = DiaryEntry.find(params[:id])
if @user != @diary_entry.user
- redirect_to :controller => "diary_entry", :action => "view", :id => params[:id]
+ redirect_to :action => "view", :id => params[:id]
elsif params[:diary_entry] && @diary_entry.update_attributes(entry_params)
- redirect_to :controller => "diary_entry", :action => "view", :id => params[:id]
+ redirect_to :action => "view", :id => params[:id]
end
set_map_location
Notifier.diary_comment_notification(@diary_comment).deliver_now
end
- redirect_to :controller => "diary_entry", :action => "view", :display_name => @entry.user.display_name, :id => @entry.id
+ redirect_to :action => "view", :display_name => @entry.user.display_name, :id => @entry.id
else
render :action => "view"
end
def require_administrator
unless @user.administrator?
flash[:error] = t("user.filter.not_an_administrator")
- redirect_to :controller => "diary_entry", :action => "view"
+ redirect_to :action => "view"
end
end
if @message.save
flash[:notice] = t "message.new.message_sent"
Notifier.message_notification(@message).deliver_now
- redirect_to :controller => "message", :action => "inbox", :display_name => @user.display_name
+ redirect_to :action => "inbox", :display_name => @user.display_name
end
end
end
@title = t "message.inbox.title"
if @user && params[:display_name] == @user.display_name
else
- redirect_to :controller => "message", :action => "inbox", :display_name => @user.display_name
+ redirect_to :action => "inbox", :display_name => @user.display_name
end
end
@title = t "message.outbox.title"
if @user && params[:display_name] == @user.display_name
else
- redirect_to :controller => "message", :action => "outbox", :display_name => @user.display_name
+ redirect_to :action => "outbox", :display_name => @user.display_name
end
end
@message.message_read = message_read
if @message.save && !request.xhr?
flash[:notice] = notice
- redirect_to :controller => "message", :action => "inbox", :display_name => @user.display_name
+ redirect_to :action => "inbox", :display_name => @user.display_name
end
rescue ActiveRecord::RecordNotFound
@title = t "message.no_such_message.title"
if params[:referer]
redirect_to params[:referer]
else
- redirect_to :controller => "message", :action => "inbox", :display_name => @user.display_name
+ redirect_to :action => "inbox", :display_name => @user.display_name
end
end
rescue ActiveRecord::RecordNotFound
@title = t "trace.view.title", :name => @trace.name
else
flash[:error] = t "trace.view.trace_not_found"
- redirect_to :controller => "trace", :action => "list"
+ redirect_to :action => "list"
end
rescue ActiveRecord::RecordNotFound
flash[:error] = t "trace.view.trace_not_found"
- redirect_to :controller => "trace", :action => "list"
+ redirect_to :action => "list"
end
def create
@user.data_public = true
@user.save
flash[:notice] = t "user.go_public.flash success"
- redirect_to :controller => "user", :action => "account", :display_name => @user.display_name
+ redirect_to :action => "account", :display_name => @user.display_name
end
def lost_password
if params[:referer]
redirect_to params[:referer]
else
- redirect_to :controller => "user", :action => "view"
+ redirect_to :action => "view"
end
end
else
if params[:referer]
redirect_to params[:referer]
else
- redirect_to :controller => "user", :action => "view"
+ redirect_to :action => "view"
end
end
else
def set_status
@this_user.status = params[:status]
@this_user.save
- redirect_to :controller => "user", :action => "view", :display_name => params[:display_name]
+ redirect_to :action => "view", :display_name => params[:display_name]
end
##
# delete a user, marking them as deleted and removing personal data
def delete
@this_user.delete
- redirect_to :controller => "user", :action => "view", :display_name => params[:display_name]
+ redirect_to :action => "view", :display_name => params[:display_name]
end
##
# - If they were referred to the login, send them back there.
# - Otherwise, send them to the home page.
if REQUIRE_TERMS_SEEN && !user.terms_seen
- redirect_to :controller => :user, :action => :terms, :referer => target
+ redirect_to :action => :terms, :referer => target
elsif user.blocked_on_view
redirect_to user.blocked_on_view, :referer => target
else
flash[:error] = t("user.filter.not_an_administrator")
if params[:display_name]
- redirect_to :controller => "user", :action => "view", :display_name => params[:display_name]
+ redirect_to :action => "view", :display_name => params[:display_name]
else
- redirect_to :controller => "user", :action => "login", :referer => request.fullpath
+ redirect_to :action => "login", :referer => request.fullpath
end
elsif !@user
- redirect_to :controller => "user", :action => "login", :referer => request.fullpath
+ redirect_to :action => "login", :referer => request.fullpath
end
end
def lookup_user_by_name
@this_user = User.find_by_display_name(params[:display_name])
rescue ActiveRecord::RecordNotFound
- redirect_to :controller => "user", :action => "view", :display_name => params[:display_name] unless @this_user
+ redirect_to :action => "view", :display_name => params[:display_name] unless @this_user
end
##