forked from mattetti/merb-book
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
36 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 9 additions & 6 deletions
15
book-content/en/5-interacting-with-the-database-sequel/toc.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,10 +1,13 @@ | |||
# interacting-with-the-database-sequel | # interacting-with-the-database-sequel | ||
|
|
||
1. [Installation and setup](/interacting-with-the-database-sequel/setting-up) | <ul class='toc'><li><a href='/en/interacting-with-the-database-sequel/up'>Installation and setup</a><ul style='list-style: none;'><li><a href='/en/interacting-with-the-database-sequel/up#generating_a_project_with_sequel'>Generating a project with Sequel</a></li></ul></li></ul> | ||
1. [Database Migrations](/interacting-with-the-database-sequel/migrations) | |||
1. [Data Retrieval and Manipulation](/interacting-with-the-database-sequel/data-retrieval-and-manipulation) | |||
1. [Model Associations](/interacting-with-the-database-sequel/model-associations) | |||
1. [Model Validation](/interacting-with-the-database-sequel/model-validation) | |||
1. [Sequel Plugins](/interacting-with-the-database-sequel/sequel-plugins) | |||
|
|
||
<ul class='toc'><li><a href='/en/interacting-with-the-database-sequel/migrations'>Database Migrations</a></li></ul> | |||
|
|
||
<ul class='toc'><li><a href='/en/interacting-with-the-database-sequel/manipulation'>Database Retreival and Manipulation</a><ul style='list-style: none;'><li><a href='/en/interacting-with-the-database-sequel/manipulation#finding_records'>Finding records</a></li><li><a href='/en/interacting-with-the-database-sequel/manipulation#the_other_three_letters_in_crud'>The Other Three Letters in CRUD</a><ul style='list-style: none;'><li><a href='/en/interacting-with-the-database-sequel/manipulation#create'>Create</a></li><li><a href='/en/interacting-with-the-database-sequel/manipulation#update'>Update</a></li><li><a href='/en/interacting-with-the-database-sequel/manipulation#delete'>Delete</a></li></ul></li></ul></li></ul> | |||
|
|||
<ul class='toc'><li><a href='/en/interacting-with-the-database-sequel/associations'>Model Associations</a><ul style='list-style: none;'><li><a href='/en/interacting-with-the-database-sequel/associations#one_to_many'>One to Many</a></li><li><a href='/en/interacting-with-the-database-sequel/associations#many_to_one'>Many to One</a></li><li><a href='/en/interacting-with-the-database-sequel/associations#many_to_many'>Many to Many</a></li><li><a href='/en/interacting-with-the-database-sequel/associations#one_to_one'>One to One</a></li></ul></li></ul> | |||
|
|||
<ul class='toc'><li><a href='/en/interacting-with-the-database-sequel/validation'>Model Validation</a></li></ul> | |||
|
|||
<ul class='toc'><li><a href='/en/interacting-with-the-database-sequel/plugins'>Sequel Plugins</a><ul style='list-style: none;'><li><a href='/en/interacting-with-the-database-sequel/plugins#useful_plugins'>Useful Plugins</a><ul style='list-style: none;'><li><a href='/en/interacting-with-the-database-sequel/plugins#sequel_timestamped'>sequel_timestamped</a></li><li><a href='/en/interacting-with-the-database-sequel/plugins#sequel_notnaughty'>sequel_notnaughty</a></li><li><a href='/en/interacting-with-the-database-sequel/plugins#sequel_polymorphic'>sequel_polymorphic</a></li><li><a href='/en/interacting-with-the-database-sequel/plugins#sequel_taggable'>sequel_taggable</a></li></ul></li></ul></li></ul> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,17 +1,26 @@ | |||
Merb.logger.info("Compiling routes...") | Merb.logger.info("Compiling routes...") | ||
Merb::Router.prepare do | Merb::Router.prepare do | ||
|
|||
# http://localhost:4000/ | |||
# http://localhost:4000/en/ | |||
# http://localhost:4000/fr | |||
# http://localhost:4000/table-of-contents | |||
# http://localhost:4000/en/table-of-contents | |||
# http://localhost:4000/getting-started/install-instructions | |||
# http://localhost:4000/en/getting-started/install-instructions | |||
|
|
||
match('(/:language)/table-of-contents', | match('(/:language)/table-of-contents', | ||
:language => /^[a-z]{2}$/). | :language => /^[a-z]{2}$/).to(:controller => 'pages', :action => 'index').name(:toc) | ||
to(:controller => 'pages', :action => 'index').name(:toc) |
|
||
|
|||
match('(/:language)/:chapter(/:page_name)', | match('(/:language)/:chapter(/:page_name)', | ||
:language => /^[a-z]{2}$/, | :language => /^[a-z]{2}$/, | ||
:chapter => /[^\/]{3,}/). | :chapter => /[^\/]{3,}/).to(:controller => 'pages', :action => 'show').name(:page) | ||
to(:controller => 'pages', :action => 'show').name(:page) |
|
||
|
match('/(:language)', :language => /^[a-z]{2}$/).to(:controller => 'pages', :action => 'index') | ||
# default_routes |
|
||
|
# match('(/:language)(/)', :language => /^[a-z]{2}$/).to(:controller => "pages") do | ||
match('/(:language)', :language => /^[a-z]{2}$/). | # match(":chapter(/:page_name)", :chapter => %r'[^/.;?]{3,}').to(:action => "show").name(:page) | ||
to(:controller => 'pages', :action => 'index') | # match("(table-of-contents)").name(:toc) | ||
# end | |||
|
|||
end | end |