Skip to content
This repository
Browse code

Fixed bug that was making it difficult to add namespaced controllers;…

… updated gemspec for 0.2.1 release; removed the last version's goldberg:upgrade rake task; updated the README for 0.2.1 release.

git-svn-id: svn+ssh://rubyforge.org/var/svn/goldberg/trunk/goldberg/templates/vendor/plugins/goldberg@93 2112df0d-361b-0410-855b-e9e795e2bf81
  • Loading branch information...
commit 0327bd6da3c9f6d64f049a324c49fd0ede2d5eba 1 parent 62ffeb9
Dave Nelson authored
2  app/controllers/goldberg/site_controllers_controller.rb
@@ -37,7 +37,7 @@ def new
37 37
38 38 def new_called
39 39 foreign
40   - @site_controller = SiteController.new(:name => params[:id])
  40 + @site_controller = SiteController.new(:name => params[:id].gsub(/\%2F/, '/'))
41 41 render :action => 'new'
42 42 end
43 43
2  app/views/goldberg/site_controllers/list.rhtml
@@ -41,7 +41,7 @@
41 41 classes, but they have not yet been set up in Goldberg:</p></div>
42 42 <ul>
43 43 <% for name in @unknown.keys do -%>
44   -<li> <%= link_to name, :action => 'new_called', :id => name %> </li>
  44 +<li> <%= link_to name, :action => 'new_called', :id => name.gsub(/\//, '%2F') %> </li>
45 45 <% end -%>
46 46 </ul>
47 47 </div>
27 tasks/goldberg_tasks.rake
@@ -53,31 +53,4 @@ namespace :goldberg do
53 53 Goldberg::Role.rebuild_cache
54 54 end
55 55
56   - desc "Upgrade a legacy Goldberg database to the latest version"
57   - task :upgrade => [:install, :flush] do
58   - # Prefix all the builtin controllers with 'goldberg/'
59   - controllers = Goldberg::SiteController.find :all
60   - controllers.each do |c|
61   - if c.builtin == 1 and not (c.name =~ /^goldberg/)
62   - c.name = 'goldberg/' + c.name
63   - c.save
64   - end
65   - end
66   -
67   - # Convert all the numeric markup styles to the new text format.
68   - pages = Goldberg::ContentPage.find :all
69   - pages.each do |p|
70   - case p.markup_style_id
71   - when 1
72   - p.markup_style = 'Textile'
73   - when 2
74   - p.markup_style = 'Markdown'
75   - end
76   - p.save
77   - end
78   -
79   - # Rebuild role caches
80   - Goldberg::Role.rebuild_cache
81   - end
82   -
83 56 end

0 comments on commit 0327bd6

Please sign in to comment.
Something went wrong with that request. Please try again.