Sha256: e335add3d85af41fb25dfe82c8803d4f4e9d9589ed32fd7f4e48bfbf446b56fe

Contents?: true

Size: 815 Bytes

Versions: 1

Compression:

Stored size: 815 Bytes

Contents

class NetzkeController < ActionController::Base

  # collect javascripts from all plugins that registered it in Netzke::Base.config[:javascripts]
  def netzke
    respond_to do |format|
      format.js {
        res = ""
        Netzke::Base.config[:javascripts].each do |path|
          f = File.new(path)
          res << f.read
        end
        render :text => res.strip_js_comments
      }
      
      format.css {
        res = ""
        Netzke::Base.config[:css].each do |path|
          f = File.new(path)
          res << f.read
        end
        render :text => res
      }
    end
  end
  
  def method_missing(action)
    respond_to do |format|
      format.js {
        render :text => "#{action}.js"
      }
      format.css {
        render :text => "#{action}.css"
      }
    end
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
netzke-core-0.2.8 lib/app/controllers/netzke_controller.rb