Sha256: 5a4802e09d2b063d5c1ee6a2fe5d4e79c77dd9e02548f28ff271e18b67943a78

Contents?: true

Size: 1002 Bytes

Versions: 7

Compression:

Stored size: 1002 Bytes

Contents

module Playmo
  module Recipes
    class ApplicationControllerRecipe < Playmo::Recipe
      source_root File.expand_path('../templates/application_controller_recipe', __FILE__)

      def setup
        silently do
          remove_file 'app/controllers/application_controller.rb'
          copy_file   'application_controller.rb', 'app/controllers/application_controller.rb'
          empty_directory "app/views/application"
          copy_file "internal_error.html.erb", "app/views/application/internal_error.html.erb"
          copy_file "not_found.html.erb", "app/views/application/not_found.html.erb"

          # To catch routing errors
          route 'match "*catch_all" => "application#not_found"'
        end
      end
    end
  end
end

# Write down this recipe to our Cookbook if it's available
require File.dirname(__FILE__) + '/assets_recipe'
Playmo::Cookbook.instance.insert_after(Playmo::Recipes::AssetsRecipe, Playmo::Recipes::ApplicationControllerRecipe) if defined?(Playmo::Cookbook)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
playmo-0.0.18 lib/playmo/recipes/application_controller_recipe.rb
playmo-0.0.17 lib/playmo/recipes/application_controller_recipe.rb
playmo-0.0.14 lib/playmo/recipes/application_controller_recipe.rb
playmo-0.0.13 lib/playmo/recipes/application_controller_recipe.rb
playmo-0.0.12 lib/playmo/recipes/application_controller_recipe.rb
playmo-0.0.11 lib/playmo/recipes/application_controller_recipe.rb
playmo-0.0.10 lib/playmo/recipes/application_controller_recipe.rb