Through trial and error, I got the rails_support extension working in
0.6.7 and Rails 2.0.2. But now I'm trying out the share_layouts
extension and I'm having some problems getting it to work. In this
project, my app is already made into an extension and I'm trying to
integrate with the Radiant part of the site. Will share_layouts work
being called from a controller in an extension? Or does it expect there
to be a RAILS_ROOT/app folder. When I use the line 

radiant_layout 'Main'

I get an error that radiant_layout in an undefined method.

When I use

@radiant_layout = 'Main'

it creates the page but displays it in the admin layout.  ???
If I substitute a fake name for Main, it does the same thing so it
appears to be defaulting to the admin layout.

When I backed up and ran the tests for share_layouts, I get a failure.
The results are below.

It looks like it is not loading a helper.

I appreciate any help and tips on how to use this extension.

Thanks,
Will Emerson





102:share_layouts willemerson$ rake --trace
(in /Users/willemerson/work/essence/vendor/extensions/share_layouts)
** Invoke default (first_time)
** Invoke test (first_time)
** Execute test
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
-Ilib:lib
"/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader.rb"
"test/functional/share_layouts_extension_test.rb"
"test/functional/share_layouts_test.rb"
"test/unit/radiant_layouts_test.rb" "test/unit/rails_page_test.rb"
"test/unit/share_layouts_helper_test.rb" 
/Users/willemerson/work/essence/vendor/extensions/page_attachments/lib/
geometry.rb:6: warning: already initialized constant FLAGS
/Users/willemerson/work/essence/vendor/extensions/page_attachments/lib/
geometry.rb:11: warning: already initialized constant RFLAGS
/Users/willemerson/work/essence/vendor/extensions/page_attachments/lib/
geometry.rb:28: warning: already initialized constant RE
Loaded suite
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader
Started
..........F....E.............
Finished in 0.627939 seconds.

  1) Failure:
test_should_add_helper(ShareLayoutsExtensionTest)
[./test/functional/share_layouts_extension_test.rb:16]:
<false> is not true.

  2) Error:
test_should_assign_layout_of_page(ShareLayoutsHelperTest):
NoMethodError: undefined method `_layout' for #<RailsPage:0x21ecf74>

/Library/Ruby/Gems/1.8/gems/radiant-0.6.7/vendor/rails/activerecord/lib/
active_record/attribute_methods.rb:205:in `method_missing'

/Users/willemerson/work/essence/vendor/extensions/share_layouts/test/
unit/share_layouts_helper_test.rb:35:in
`test_should_assign_layout_of_page'

29 tests, 56 assertions, 1 failures, 1 errors
rake aborted!
Command failed with status (1):
[/System/Library/Frameworks/Ruby.framework/...]
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:899:in `sh'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:906:in `call'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:906:in `sh'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:985:in `sh'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:920:in `ruby'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:985:in `ruby'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake/testtask.rb:117:in
`define'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1003:in `verbose'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake/testtask.rb:102:in
`define'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in
`invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
`invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:518:in
`invoke_prerequisites'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `send'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:in
`invoke_prerequisites'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in
`invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
`invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in `invoke_task'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
`standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
`standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.8.1/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to