Sha256: 19ec4400a80d657765116557559c730fba300af343b8909ad61fb0608156c837

Contents?: true

Size: 774 Bytes

Versions: 9

Compression:

Stored size: 774 Bytes

Contents

#
# Copies all the javascripts in place and updates them if necessary
#
# Kudos to Jose Fernández (http://github.com/magec)
#
class RightRailsGenerator < Rails::Generators::Base

  def manifest
    source_path      = File.dirname(__FILE__)
    images_path      = "#{source_path}/../../../public/images/rightjs-ui"
    javascripts_path = "#{source_path}/../../../public/javascripts"

    # copying the javascript javascript files
    directory javascripts_path , "public/javascripts/"

    # creating the iframed uploads layout
    copy_file source_path + "/templates/iframed.html.erb", "app/views/layouts/iframed.html.erb"

    # copying the images in place
    directory images_path, "public/images/rightjs-ui"
  end

  def banner
    "Usage: #{$0} right_rails"
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
right-rails-1.2.2 lib/generators/right_rails/right_rails_generator.rb
right-rails-1.2.1 lib/generators/right_rails/right_rails_generator.rb
right-rails-1.2.0 lib/generators/right_rails/right_rails_generator.rb
right-rails-1.1.0 lib/generators/right_rails/right_rails_generator.rb
right-rails-1.0.12 lib/generators/right_rails/right_rails_generator.rb
right-rails-1.0.10 lib/generators/right_rails/right_rails_generator.rb
right-rails-1.0.9 lib/generators/right_rails/right_rails_generator.rb
right-rails-1.0.8 lib/generators/right_rails/right_rails_generator.rb
right-rails-1.0.6 lib/generators/right_rails/right_rails_generator.rb