From a353d767b6f1717d4b6cf682b22023a4af6ab8ac Mon Sep 17 00:00:00 2001 From: Nico Date: Fri, 8 Feb 2013 12:33:49 +0100 Subject: [PATCH] =?UTF-8?q?probl=C3=A8me=20routes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/portfolios/index.html.haml | 2 +- config/routes.rb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/portfolios/index.html.haml b/app/views/portfolios/index.html.haml index 4356d00..b98d1c4 100644 --- a/app/views/portfolios/index.html.haml +++ b/app/views/portfolios/index.html.haml @@ -11,7 +11,7 @@ Inauguration le samedi 23 mars à 11h. -@index_images.each do |img| - =link_to image_tag(img.photo.square.url), portfolio_path(:id => img.portfolios.first.slug, :page => img.page(img.portfolios.first),:position => img.position(img.portfolios.first)) + =link_to image_tag(img.photo.square.url), portfolio_path(:id => img.portfolios.first.slug, :page => img.page(img.portfolios.first)) %p{:style => "clear:both;height:2px;"} :javascript function size_index_images(){ diff --git a/config/routes.rb b/config/routes.rb index 6856889..ca0150e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -4,9 +4,11 @@ SitePerso::Application.routes.draw do match ":id.:format" => 'pages#show', :as => :page, :format => "html" + match "portfolio/:id/:page.:format" => 'portfolios#show',:page => "1", :as => :portfolio, :format => "html" + resources :portfolios - #match "galerie/:slug.:format" => 'portfolios#show', :as => :portfolio, :format => "html", :via => :get + namespace :admin do root :to => "dashboard#index"