Sha256: a3243ce0224230e38daf0a72fbd2ccaf7be4b3a6b866daeb18135520448da0ed

Contents?: true

Size: 967 Bytes

Versions: 3

Compression:

Stored size: 967 Bytes

Contents

module EyeballsRailsHelper
  def eyeballs_javascripts(*mixin_javascripts)
    javascripts = ['vendor/jquery/jquery-1.4.2.min.js']
    
    javascripts << mixin_javascripts
    
    javascripts << ['vendor/mustache/mustache.0.3.0.js',
    'vendor/eyeballs/o_O',
    'vendor/eyeballs/modules/o_O.model',
    'vendor/eyeballs/modules/o_O.validations',
    'vendor/eyeballs/drivers/jquery/adapters/o_O.rest',
    'vendor/eyeballs/drivers/jquery/modules/o_O.controller',
    'vendor/eyeballs/drivers/jquery/modules/o_O.support',
    'vendor/eyeballs/drivers/jquery/modules/o_O.routes',
    'config/routes',
    'config/initializer']
    ["app/models", "app/controllers"].each do |dir|
      Dir["#{Rails.root}/public/javascripts/#{dir}/*.js"].collect do |file|
        javascripts << "#{dir}/#{File.basename(file)}"
      end
    end
    if javascripts.any?
      javascript_include_tag(javascripts)
    end
  end
end

ActionView::Base.send(:include, EyeballsRailsHelper)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
eyeballs_rails-0.1.6 lib/eyeballs_rails_helper.rb
eyeballs_rails-0.1.5 lib/eyeballs_rails_helper.rb
eyeballs_rails-0.1.4 lib/eyeballs_rails_helper.rb