Re: [Radiant] share_layouts extension
Whoops, I lied. You do *not* need to uncomment: require_dependency 'application' for your extension to play with share_layouts (unless you're doing something with your controllers in the activate method too). I was looking at the wrong extension's code when I mistyped -- sorry. -Chris Chris Parrish wrote: Will Emerson wrote: 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. I'm using share_layouts within an extension (using the extension's controllers to process the page) currently with 0.6.7. Make sure that you uncomment the following line from your my_extension_name.rb file: require_dependency 'application' When I use the line radiant_layout 'Main' I get an error that radiant_layout in an undefined method. Hmm, that's weird. Where are you putting that line? It should be available as a class method like: class MyController < ApplicationController radiant_layout 'Main' ... your methods/actions here... end 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. Do you actually have a layout created in Radiant called "Main"? -Chris ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] share_layouts extension
On Sat, 2008-06-14 at 14:40 -0700, Will Emerson wrote: > Through trial and error, I got the rails_support extension working in > 0.6.7 and Rails 2.0.2. Do you have any pointers for getting the rails_support extension working? I am about to tackle this and was wondering if you could share anything about the process. Thanks, Nate ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] share_layouts extension
Will Emerson wrote: 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. I'm using share_layouts within an extension (using the extension's controllers to process the page) currently with 0.6.7. Make sure that you uncomment the following line from your my_extension_name.rb file: require_dependency 'application' When I use the line radiant_layout 'Main' I get an error that radiant_layout in an undefined method. Hmm, that's weird. Where are you putting that line? It should be available as a class method like: class MyController < ApplicationController radiant_layout 'Main' ... your methods/actions here... end 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. Do you actually have a layout created in Radiant called "Main"? -Chris ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] share_layouts extension
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 ..FE. Finished in 0.627939 seconds. 1) Failure: test_should_add_helper(ShareLayoutsExtensionTest) [./test/functional/share_layouts_extension_test.rb:16]: is not true. 2) Error: test_should_assign_layout_of_page(ShareLayoutsHelperTest): NoMethodError: undefined method `_layout' for # /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.
[Radiant] Re: Re: Layouts, snippets and site assets on the file system?
Gah! Shafted again! How long you gonna keep these awesome extensions under your wings? What detoxing needs to be done? Sean Cribbs wrote: > Jonathan McCoy wrote: >> settings. >> > You just described the file_system extension written for Redken to a T. > I would like to release it but I'm not ready to support it yet or to > detox the code. > > Sean -- Posted via http://www.ruby-forum.com/. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Re: Layouts, snippets and site assets on the file system?
Jonathan McCoy wrote: Highly unlikely. FUSE is a modular file system API - basically a simple means to build your own file system without actually having to do anything majorly complex. Although yes, what you linked to would be a cool solution - it still lacks version control. You'd also have to make it uber-bespoke to Radiant, and to each model in the Radiant schema, otherwise you'll be working with YAML etc. If somebody did build a FUSE interface for Radiant, it would be nice if each page is represented by a folder, with files corresponding to each page part, with the extension being the filter used. A meta file could contain the overall page settings. You just described the file_system extension written for Redken to a T. I would like to release it but I'm not ready to support it yet or to detox the code. Sean ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] Re: Layouts, snippets and site assets on the file system?
Daniel Collis-puro wrote: > Was this done via FUSE? > > http://redhanded.hobix.com/inspect/railsfsAfterACoupleMinutesOfToolingWithFuseWhoa.html > > Seems like that's the "Right" way. I've used FUSE extensively to mount > remote filesystems via SSH and it works wonderfully. > > --DJCP Highly unlikely. FUSE is a modular file system API - basically a simple means to build your own file system without actually having to do anything majorly complex. Although yes, what you linked to would be a cool solution - it still lacks version control. You'd also have to make it uber-bespoke to Radiant, and to each model in the Radiant schema, otherwise you'll be working with YAML etc. If somebody did build a FUSE interface for Radiant, it would be nice if each page is represented by a folder, with files corresponding to each page part, with the extension being the filter used. A meta file could contain the overall page settings. eg: /welcome/ (path is slug) /welcome/page.meta (YAML settings for page) /welcome/body.textile /welcome/extended.smartypants /welcome/extended.html (plain/non-filtered) and so forth... The real goal here however, is to allow layouts and partials to exist in the filesystem (within the 'app/view' folder structure), which immediately allows you to use an SCM (SVN, CVS, GIT etc) either for the whole project, or as an SVN External (or GIT/CVS equivalent). My preference would be to allow both file system and DB based layouts/snippets to co-exist, with file system layouts taking precedence in case of name clashes. It'd be great to use HAML as well. I'd also add, support for Multi-Site would be highly desired. Jon. -- Posted via http://www.ruby-forum.com/. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant