app/controllers/sandbox_assets/base_controller.rb in rails-sandbox-assets-0.0.3 vs app/controllers/sandbox_assets/base_controller.rb in rails-sandbox-assets-0.0.4
- old
+ new
@@ -1,10 +1,11 @@
require "sandbox_assets/test_asset"
module SandboxAssets
class BaseController < ActionController::Base
before_filter :find_tests
+ before_filter :find_stylesheets
before_filter :extract_template_from_params
before_filter :render_template
# additional before_filters can use this
def template=(template)
@@ -13,9 +14,13 @@
protected
def find_tests
@tests = TestAsset.find_tests(params)
+ end
+
+ def find_stylesheets
+ @stylesheets = TestAsset.find_stylesheets(params)
end
def extract_template_from_params
@template ||= params[:template] unless cfg.disable_template_param
end