diff --git a/app/views/snippets/index.html.haml b/app/views/snippets/index.html.haml index 8aa3d490fa335c0b38b0d484c1322357ab7d98ed..7e4918a60854f237eaffb103bc86589c163d30de 100644 --- a/app/views/snippets/index.html.haml +++ b/app/views/snippets/index.html.haml @@ -1,13 +1,13 @@ - - page_title "By #{@user.name}", "Snippets" +- page_title "By #{@user.name}", "Snippets" - %ol.breadcrumb - %li - = link_to snippets_path do - Snippets - %li - = @user.name - .pull-right.hidden-xs - = link_to user_path(@user) do - #{@user.name} profile page +%ol.breadcrumb + %li + = link_to snippets_path do + Snippets + %li + = @user.name + .pull-right.hidden-xs + = link_to user_path(@user) do + #{@user.name} profile page - = render 'snippets' += render 'snippets' diff --git a/config/routes.rb b/config/routes.rb index 594bab204fd869c6d664e1f1d28c76beec97d6c0..881de37f10e2ccf906c4b92c4da5cf6ec5e64101 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -344,15 +344,16 @@ Rails.application.routes.draw do end scope(path: 'u/:username', + as: :user, constraints: { username: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ }, controller: :users) do - get :calendar, action: :calendar, as: :user_calendar - get :calendar_activities, action: :calendar_activities, as: :user_calendar_activities - get :groups, action: :groups, as: :user_groups - get :projects, action: :projects, as: :user_projects - get :contributed, action: :contributed, as: :user_contributed_projects - get :snippets, action: :snippets, as: :user_snippets - get '/', action: :show, as: :user + get :calendar + get :calendar_activities + get :groups + get :projects + get :contributed, as: :contributed_projects + get :snippets + get '/', action: :show end #