Re: [Radiant] Make extension objects reload between requests
I'm a novice at extension authoring, but in my experience the code gets reloaded every second refresh. No explanation why that'd be (Chrome + 0.9.1 + Mongrel), but it works for me. - Jeff On Mon, Oct 25, 2010 at 10:03 AM, Josh French j...@digitalpulp.com wrote: On Oct 24, 2010, at 5:24 PM, Wes Gamble wrote: Are Radiant custom extension controllers, models, etc. supposed to reload between each request like regular Rails objects in development mode or not? Rails sees Radiant extensions as plugins, not engines or native application entities. They won't get reloaded unless you take steps to make it happen. If you take a look at the PageFactory extension, I'm doing something along those lines: Dir[#{path}/*_page_factory.rb].each do |page_factory| if page_factory =~ %r{/([^/]+)\.rb} require_dependency page_factory ActiveSupport::Dependencies.explicitly_unloadable_constants $1.camelize end end I'm 1) registering my own classes with ActiveSupport's dependency mechanism, and 2) telling ActiveSupport that these need to get reloaded between requests. Hope that helps, j
Re: [Radiant] Need help with Compass configuration for Radiant
You shouldn't need any special measures. Have you tried just putting @import compass/css3 At the top of one of your sheets? On edge that should just work. Best, Will Please excuse speling. Fat thumbs. On 25 Oct 2010, at 18:51, Wes Gamble we...@att.net wrote: Radiant 0.9.1 (vendor'ed) SNS extension I'd like to take advantage of various Compass Sass features within my Radiant layouts (e.g. border-radius, etc.). Compass initialization file: I pulled down the radiant/config/initializers/compass.rb file from Github and placed it into vendor/radiant/config/initializers require 'compass' require 'compass/app_integration/rails' Compass::AppIntegration::Rails.initialize! Compass configuration file: I took a compass.rb from another (non-Radiant) project and placed it in vendor/radiant/config. I changed the paths based on my current settings for the SNS extension: # This configuration file works with both the Compass command line tool and within Rails. # Require any additional compass plugins here. project_type = :rails project_path = Compass::AppIntegration::Rails.root # Set this to the root of your project when deployed: http_path = / css_dir = css http_stylesheets_path = /stylesheets sass_dir = stylesheets/sass images_dir = public/images http_images_path = /images javascripts_dir = public/javascripts http_javascripts_path = /javascripts environment = Compass::AppIntegration::Rails.env # To enable relative paths to assets via compass helper functions. Uncomment: # relative_assets = true I @import compass/css3/border-radius in my Radiant-managed CSS (Sass) file, but cannot use the +border-radius mixin within my CSS. What am I doing wrong? Many thanks, Wes Gamble