before_filter :set_locale
before_filter :require_user, :only => [:edit]
- def export
- render :action => 'index'
- end
-
def permalink
lon, lat, zoom = ShortLink::decode(params[:code])
new_params = params.clone
e.preventDefault();
});
- <% if params[:action] == 'export' -%>
+ <% if params[:export] -%>
$("#exportanchor").click();
<% end -%>
match '/copyright' => 'site#copyright', :via => :get
match '/history' => 'changeset#list', :via => :get
match '/history/feed' => 'changeset#feed', :via => :get, :format => :atom
- match '/export' => 'site#export', :via => :get
+ match '/export' => 'site#index', :export => true, :via => :get
match '/login' => 'user#login', :via => [:get, :post]
match '/logout' => 'user#logout', :via => [:get, :post]
match '/offline' => 'site#offline', :via => :get
)
assert_routing(
{ :path => "/export", :method => :get },
- { :controller => "site", :action => "export" }
+ { :controller => "site", :action => "index", :export => true }
)
assert_recognizes(
- { :controller => "site", :action => "export", :format => "html" },
+ { :controller => "site", :action => "index", :export => true, :format => "html" },
{ :path => "/export.html", :method => :get }
)
assert_routing(
assert_redirected_to :controller => :user, :action => 'login', :referer => "/edit"
end
- # Get the export page
- def test_export
- get :export
- assert_response :success
- assert_template 'index'
- assert_site_partials
- end
-
# Offline page
def test_offline
get :offline