problème routes

This commit is contained in:
Nico 2013-02-08 12:27:43 +01:00
parent 9d65881ee1
commit 4a5422ac9f
4 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@ class PagesController < ApplicationController
def show
@slug = params[:slug]
@slug = params[:id]
if @slug

View File

@ -29,7 +29,7 @@
#menu
=link_to image_tag("logo.png", :id => "logo"), "/"
=link_to raw("<h4>A propos</h4>"), "a-propos.html"
=link_to raw("<h4>A propos</h4>"), page_path("a-propos")
%h4
@ -39,8 +39,8 @@
%ul.portfolios_links
=render Portfolio.order(:title)
=link_to raw("<h4>Partenaires</h4>"), "partenaires.html"
=link_to raw("<h4>Contact</h4>"), "contact.html"
=link_to raw("<h4>Partenaires</h4>"), page_path("partenaires")
=link_to raw("<h4>Contact</h4>"), page_path("contact")
-if @images

View File

@ -1,5 +1,5 @@
%li#portfolio_line{:id => portfolio.id}
=link_to portfolio.title, portfolio.path
=link_to portfolio.title, portfolio_path(portfolio.slug, :format => :html)
-if current_admin
=link_to i(:pen_alt_fill,:white,32, :style => "width:10px;"), edit_portfolio_path(portfolio, :format => "js"), :remote => true

View File

@ -3,7 +3,7 @@ SitePerso::Application.routes.draw do
match ":slug.:format" => 'pages#show', :as => :page, :format => "html"
match ":id.:format" => 'pages#show', :as => :page, :format => "html"
resources :portfolios
#match "galerie/:slug.:format" => 'portfolios#show', :as => :portfolio, :format => "html", :via => :get