change root_path and root_url to multi_path

This commit is contained in:
danielgrippi 2011-11-14 18:00:50 -08:00
parent 52aaf33296
commit 6be778b9b2
9 changed files with 14 additions and 14 deletions

View file

@ -94,7 +94,7 @@ class ApplicationController < ActionController::Base
def redirect_unless_admin def redirect_unless_admin
unless current_user.admin? unless current_user.admin?
redirect_to root_url, :notice => 'you need to be an admin to do that' redirect_to multi_url, :notice => 'you need to be an admin to do that'
return return
end end
end end

View file

@ -52,7 +52,7 @@ class PostsController < ApplicationController
current_user.retract(@post) current_user.retract(@post)
respond_to do |format| respond_to do |format|
format.js {render 'destroy'} format.js {render 'destroy'}
format.all {redirect_to root_url} format.all {redirect_to multi_path}
end end
else else
Rails.logger.info "event=post_destroy status=failure user=#{current_user.diaspora_handle} reason='User does not own post'" Rails.logger.info "event=post_destroy status=failure user=#{current_user.diaspora_handle} reason='User does not own post'"

View file

@ -71,7 +71,7 @@ class StatusMessagesController < ApplicationController
respond_to do |format| respond_to do |format|
format.js { render :create, :status => 201} format.js { render :create, :status => 201}
format.html { redirect_to :back} format.html { redirect_to :back}
format.mobile{ redirect_to root_url} format.mobile{ redirect_to multi_path}
end end
else else
unless photos.empty? unless photos.empty?

View file

@ -85,7 +85,7 @@ class UsersController < ApplicationController
current_user.lock_access! current_user.lock_access!
sign_out current_user sign_out current_user
flash[:notice] = I18n.t 'users.destroy.success' flash[:notice] = I18n.t 'users.destroy.success'
redirect_to root_path redirect_to multi_path
else else
if params[:user].present? && params[:user][:current_password].present? if params[:user].present? && params[:user][:current_password].present?
flash[:error] = t 'users.destroy.wrong_password' flash[:error] = t 'users.destroy.wrong_password'
@ -109,7 +109,7 @@ class UsersController < ApplicationController
format.any { redirect_to person_path(user.person.id) } format.any { redirect_to person_path(user.person.id) }
end end
else else
redirect_to root_url, :error => I18n.t('users.public.does_not_exist', :username => params[:username]) redirect_to multi_path, :error => I18n.t('users.public.does_not_exist', :username => params[:username])
end end
end end
@ -125,14 +125,14 @@ class UsersController < ApplicationController
def logged_out def logged_out
@page = :logged_out @page = :logged_out
if user_signed_in? if user_signed_in?
redirect_to root_path redirect_to multi_path
end end
end end
def getting_started_completed def getting_started_completed
user = current_user user = current_user
user.update_attributes(:getting_started => false) user.update_attributes(:getting_started => false)
redirect_to root_path redirect_to multi_path
end end
def export def export

View file

@ -88,7 +88,7 @@ class VannaController < Vanna::Base
def redirect_unless_admin def redirect_unless_admin
unless current_user.admin? unless current_user.admin?
redirect_to root_url, :notice => 'you need to be an admin to do that' redirect_to multi_path, :notice => 'you need to be an admin to do that'
return return
end end
end end

View file

@ -4,9 +4,9 @@
.container{:style => "position:relative;"} .container{:style => "position:relative;"}
- if current_user - if current_user
= link_to image_tag('logo_small.png', :height => "16px", :width => "161px", :class => "diaspora_header_logo"), root_path = link_to image_tag('logo_small.png', :height => "16px", :width => "161px", :class => "diaspora_header_logo"), multi_path
- else - else
= link_to image_tag('logo_large.png', :height => "32px", :width => "321px", :class => "diaspora_header_logo"), root_path = link_to image_tag('logo_large.png', :height => "32px", :width => "321px", :class => "diaspora_header_logo"), multi_path
- if !current_user - if !current_user
.right .right

View file

@ -25,7 +25,7 @@
%h4 %h4
= t('.simply_visit') = t('.simply_visit')
%strong %strong
= link_to AppConfig[:pod_url], root_url = link_to AppConfig[:pod_url], multi_path
= t('.on_your_mobile_device') = t('.on_your_mobile_device')
%p.dull %p.dull

View file

@ -58,7 +58,7 @@ DIASPORA* ALPHA
<li><a href="http://twitter.com/joindiaspora">@joindiaspora</a></li> <li><a href="http://twitter.com/joindiaspora">@joindiaspora</a></li>
<li><a href="https://github.com/diaspora/diaspora">github</a></li> <li><a href="https://github.com/diaspora/diaspora">github</a></li>
<li><a href="http://blog.joindiaspora.com/">blog</a></li> <li><a href="http://blog.joindiaspora.com/">blog</a></li>
<li><a href="/users/sign_in" class="login">log in</a></li> <li><a href="/users/sign_in" class="login">Login</a></li>
</ul> </ul>
</div> </div>
</div> </div>

View file

@ -14,7 +14,7 @@ describe AdminsController do
context 'admin not signed in' do context 'admin not signed in' do
it 'is behind redirect_unless_admin' do it 'is behind redirect_unless_admin' do
get :user_search get :user_search
response.should redirect_to root_url response.should redirect_to multi_path
end end
end end
@ -64,7 +64,7 @@ describe AdminsController do
context 'admin not signed in' do context 'admin not signed in' do
it 'is behind redirect_unless_admin' do it 'is behind redirect_unless_admin' do
get :admin_inviter get :admin_inviter
response.should redirect_to root_url response.should redirect_to multi_path
end end
end end