forked from mocra/custom_google_forms
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
home page is a dynamic list of forms
- Loading branch information
Showing
5 changed files
with
22 additions
and
16 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 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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/ Home | ||
#home | ||
%h2 Our forms | ||
|
||
%ul | ||
- for form in @forms | ||
%li= link_to form.title, "/#{form.slug}" | ||
|
||
|
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 | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
ActionController::Routing::Routes.draw do |map| | ||
map.resources :google_forms | ||
|
||
map.root :controller => 'home', :action => 'index' | ||
map.with_options :controller => 'operate_form' do |f| | ||
f.root :action => 'index' | ||
f.submit_operate_form "operate_form/:id", :action => "update" | ||
f.catch_all "*slug", :controller => "operate_form", :action => "show" | ||
end | ||
|
||
map.submit_operate_form "operate_form/:id", :controller => "operate_form", :action => "update" | ||
map.catch_all "*slug", :controller => "operate_form", :action => "show" | ||
|
||
end |