Class: StyleguideController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- StyleguideController
- Extended by:
- ActiveSupport::Memoizable
- Defined in:
- app/controllers/styleguide_controller.rb
Class Method Summary collapse
-
.initialize_stylesheets_path_config ⇒ Object
Set up the stylesheets configuration.
Instance Method Summary collapse
-
#show ⇒ Object
Show a styleguide.
Class Method Details
.initialize_stylesheets_path_config ⇒ Object
Set up the stylesheets configuration
7 8 9 10 |
# File 'app/controllers/styleguide_controller.rb', line 7 def self.initialize_stylesheets_path_config self.config.stylesheets_path ||= {} self.config.stylesheets_path[:default] ||= File.join(Rails.root, Rails.application.paths["app/assets"], "stylesheets") end |
Instance Method Details
#show ⇒ Object
Show a styleguide
22 23 24 25 26 27 28 29 30 31 |
# File 'app/controllers/styleguide_controller.rb', line 22 def show id = params[:id] id ||= :default @styleguide = styleguide(id) respond_to do |format| format.html { render id.to_s } end end |