Changeset 1252

Show
Ignore:
Timestamp:
2008-11-13 21:37:06 (2 months ago)
Author:
gaspard
Message:

commit f113d4a4cf77aabcbe1150d6649f5d061cee0def
Author: Gaspard Bucher <gaspard@teti.ch>

Easier zena enhancement through plugins (fixes bugs in last commit).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/controllers/application.rb

    r1237 r1252  
    886886end 
    887887 
     888load_models_from_plugins 
    888889load_patches_from_plugins 
  • trunk/lib/core_ext/patcher.rb

    r1251 r1252  
    1919def load_models_from_plugins 
    2020  foreach_plugin do |plugin_path| 
    21     Dir.foreach(File.join(plugins_path, 'models')) do |model_name| 
    22       load File.join(plugins_path, 'models', model_name) 
     21    models_path = File.join(plugin_path, 'models') 
     22    next unless File.exist?(models_path) 
     23    Dir.foreach(models_path) do |model_name| 
     24      next if model_name =~ /\A\./ 
     25      load File.join(models_path, model_name) 
    2326    end 
    2427  end 
  • trunk/lib/parser/lib/rules/zazen.rb

    r1251 r1252  
    275275          eat $& 
    276276          # [math]....[/math] (we do not use <math> to avoid confusion with mathml) 
    277           store @helper.make_asset(:asset_tag => $1, :content => $2, :node => @options[:node], :preview => @context[:preview], :output => @context[:output]) 
     277          store @helper.make_asset(:asset_tag => $1, :content => $2, :node => @context[:node], :preview => @context[:preview], :output => @context[:output]) 
    278278        end 
    279279      else