Commit 05e9e3b51b8b527aa0fcd7217481b0eb1ce6c6f2
1 parent
16d42087
Exists in
master
and in
27 other branches
rails3: fix breadcrumbs plugin
Showing
4 changed files
with
9 additions
and
7 deletions
Show diff stats
plugins/breadcrumbs/lib/breadcrumbs_plugin/content_breadcrumbs_block.rb
... | ... | @@ -3,6 +3,8 @@ class BreadcrumbsPlugin::ContentBreadcrumbsBlock < Block |
3 | 3 | settings_items :show_cms_action, :type => :boolean, :default => true |
4 | 4 | settings_items :show_profile, :type => :boolean, :default => true |
5 | 5 | |
6 | + attr_accessible :show_cms_action, :show_profile | |
7 | + | |
6 | 8 | def self.description |
7 | 9 | _('Content Breadcrumbs') |
8 | 10 | end |
... | ... | @@ -35,7 +37,7 @@ class BreadcrumbsPlugin::ContentBreadcrumbsBlock < Block |
35 | 37 | |
36 | 38 | def content(args={}) |
37 | 39 | block = self |
38 | - lambda do | |
40 | + proc do | |
39 | 41 | trail = block.trail(@page, @profile, params) |
40 | 42 | if !trail.empty? |
41 | 43 | trail.map { |t| link_to(t[:name], t[:url], :class => 'item') }.join(content_tag('span', ' > ', :class => 'separator')) | ... | ... |
plugins/breadcrumbs/test/functional/profile_design_controller_test.rb
... | ... | @@ -17,8 +17,8 @@ class ProfileDesignControllerTest < ActionController::TestCase |
17 | 17 | @profile = fast_create(Community, :environment_id => @environment.id) |
18 | 18 | @page = fast_create(Folder, :profile_id => @profile.id) |
19 | 19 | |
20 | - box = Box.create!(:owner => @profile) | |
21 | - @block = BreadcrumbsPlugin::ContentBreadcrumbsBlock.create!(:box => box) | |
20 | + box = create(Box, :owner => @profile) | |
21 | + @block = create(BreadcrumbsPlugin::ContentBreadcrumbsBlock, :box => box) | |
22 | 22 | |
23 | 23 | user = create_user('testinguser') |
24 | 24 | @profile.add_admin(user.person) | ... | ... |
plugins/breadcrumbs/views/box_organizer/breadcrumbs_plugin/_content_breadcrumbs_block.html.erb
0 → 100644
plugins/breadcrumbs/views/box_organizer/breadcrumbs_plugin/_content_breadcrumbs_block.rhtml