metric = params[:metric] || 'ncloc'
period = params[:period].to_i if params[:period].present? && params[:period].to_i > 0
if period
- return redirect_to("/component_measures/metric/#{metric}?id=#{url_encode(@resource.key)}&period=#{period}")
+ return redirect_to(ApplicationController.root_context + "/component_measures/metric/#{metric}?id=#{url_encode(@resource.key)}&period=#{period}")
else
- return redirect_to("/component_measures/metric/#{metric}?id=#{url_encode(@resource.key)}")
+ return redirect_to(ApplicationController.root_context + "/component_measures/metric/#{metric}?id=#{url_encode(@resource.key)}")
end
end