problème routes
This commit is contained in:
parent
9d65881ee1
commit
4a5422ac9f
@ -2,7 +2,7 @@ class PagesController < ApplicationController
|
||||
|
||||
|
||||
def show
|
||||
@slug = params[:slug]
|
||||
@slug = params[:id]
|
||||
|
||||
|
||||
if @slug
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user