Permalink
Browse files

Creating a generator for copying stylesheets to application

  • Loading branch information...
1 parent 906b381 commit 768e85aff7d0c615055171715f850f5559dee2c2 @tscolari tscolari committed Aug 27, 2011
@@ -0,0 +1,12 @@
+module WebAppTheme
+ module Assets
+ class StylesheetsGenerator < Rails::Generators::Base
+ source_root File.expand_path('../../../../../../app/assets/stylesheets', __FILE__)
+
+ def copy_stylesheets
+ directory "web-app-theme", "app/assets/stylesheets/web-app-theme"
+ end
+
+ end
+ end
+end
@@ -0,0 +1,2 @@
+// Place all the behaviors and hooks related to the matching controller here.
+// All this logic will automatically be available in application.js.
@@ -0,0 +1,4 @@
+/*
+ Place all the styles related to the matching controller here.
+ They will automatically be included in application.css.
+*/
@@ -0,0 +1,5 @@
+class TestingController < ApplicationController
+ def index
+ end
+
+end
@@ -0,0 +1,2 @@
+module TestingHelper
+end
@@ -0,0 +1,2 @@
+<h1>Testing#index</h1>
+<p>Find me in app/views/testing/index.html.erb</p>
@@ -1,4 +1,6 @@
Dummy::Application.routes.draw do
+ get "testing/index"
+
# The priority is based upon order of creation:
# first created -> highest priority.
@@ -0,0 +1,9 @@
+require 'test_helper'
+
+class TestingControllerTest < ActionController::TestCase
+ test "should get index" do
+ get :index
+ assert_response :success
+ end
+
+end
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class TestingHelperTest < ActionView::TestCase
+end

0 comments on commit 768e85a

Please sign in to comment.