Permalink
Browse files

need fix some routes

  • Loading branch information...
1 parent 339d003 commit b3f71e3bc37ece6f57f2e52871206dd2c07e9180 @groteck groteck committed Jun 26, 2012
Showing with 12 additions and 6 deletions.
  1. +4 −6 config/routes.rb
  2. +8 −0 db/seeds.rb
View
@@ -1,8 +1,10 @@
CanaryConcrete::Application.routes.draw do
- scope ":locale", locale: /#{I18n.available_locales.join('|')}/ do
+ root :to => redirect("/#{I18n.default_locale}/")
- root :to => 'pages#index'
+
+ scope ":locale", locale: /#{I18n.available_locales.join('|')}/ do
+ root :to => 'pages#show', :id => Page.first.id
devise_for :users
@@ -18,10 +20,6 @@
match '*dummy', to: "error#error_404"
end
-
- root :to => redirect("/#{I18n.default_locale}/")
-
# Capture invalid pages
match '*dummy', to: "error#error_404", locale: I18n.default_locale.to_s
-
end
View
@@ -20,3 +20,11 @@
user.save!
end
end
+
+if Page.count == 0
+ Page.new.tap do |page|
+ page.title = "Index"
+ page.content = "this web don't have content please edit this web and edit the content"
+ page.save!
+ end
+end

0 comments on commit b3f71e3

Please sign in to comment.