Skip to content

Commit

Permalink
[#1008] fix for #new routes missing their controller, plus a typo fix
Browse files Browse the repository at this point in the history
BIgnore .svn folders
Correct mistake in front_controller
Missing link to controller new in generated hobo file
  • Loading branch information
adoyen authored and bryanlarsen committed May 25, 2012
1 parent 8a81a69 commit aa67dcb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -12,3 +12,4 @@ dryml/doc
.rvmrc
Gemfile
Gemfile.lock
.svn
Expand Up @@ -46,7 +46,7 @@ def add_routes
route "match 'search' => '#{file_path}#search', :as => 'site_search'"
if class_path.empty?
route "root :to => '#{file_path}#index'"
route "match ENV['RAILS_RELATIVE_URL_ROOT'] => 'front#index' if ENV['RAILS_RELATIVE_URL_ROOT'"
route "match ENV['RAILS_RELATIVE_URL_ROOT'] => 'front#index' if ENV['RAILS_RELATIVE_URL_ROOT']
else
route "match '#{file_path}' => '#{file_path}#index', :as => '#{file_path.gsub(/\//,'_')}'"
end
Expand Down
2 changes: 1 addition & 1 deletion hobo/lib/generators/hobo/routes/router.rb
Expand Up @@ -40,7 +40,7 @@ def lifecycle_routes(subsite)
def resource_routes
[
link("get '#{records}(.:format)' => '#{records}#index', :as => '#{records}'", 'index'),
link("get '#{records}/new(.:format)', :as => 'new_#{record}'", 'new'),
link("get '#{records}/new(.:format)' => '#{records}#new', :as => 'new_#{record}'", 'new'),
link("get '#{records}/:id/edit(.:format)' => '#{records}#edit', :as => 'edit_#{record}'", 'edit'),
link("get '#{records}/:id(.:format)' => '#{records}#show', :as => '#{record}', :constraints => #{ID_REQUIREMENT}", 'show'),
link("post '#{records}(.:format)' => '#{records}#create', :as => 'create_#{record}'", 'create', :post),
Expand Down

0 comments on commit aa67dcb

Please sign in to comment.