Sha256: 6a05988f5485ef4981c745382c2e23f6167a93ea31164c2c476d47d70f6c21b5

Contents?: true

Size: 629 Bytes

Versions: 8

Compression:

Stored size: 629 Bytes

Contents

recipe :application_helper do
  description 'This will add helpers that used within generated layout and views'
  after :home_controller
  
  silently do
    copy_file 'playmo_helper.rb', 'app/helpers/playmo_helper.rb'

    # TODO: Add version for prototype and Jquery
    framework = retrieve :javascript_framework
    copy_file "flash_messages_#{framework}.js.coffee", "app/assets/javascripts/flash_messages.js.coffee"

    gsub_file 'app/assets/javascripts/application.js', '//= require_tree .' do
      <<-CONTENT.gsub(/^ {8}/, '')
        //= require flash_messages
        //= require_tree .
      CONTENT
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
playmo-0.1.10 recipes/application_helper_recipe.rb
playmo-0.1.9 recipes/application_helper_recipe.rb
playmo-0.1.8 recipes/application_helper_recipe.rb
playmo-0.1.7 recipes/application_helper_recipe.rb
playmo-0.1.6 recipes/application_helper_recipe.rb
playmo-0.1.5 recipes/application_helper_recipe.rb
playmo-0.1.4 recipes/application_helper_recipe.rb
playmo-0.1.3 recipes/application_helper_recipe.rb