Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Added support for caching, controller configuration, and initializer generator. #21

wants to merge 4 commits into


None yet
2 participants

loginx commented Sep 13, 2011

This pull introduces a few changes:

  • Changes the behaviour of HighVoltage::PagesController to use method_missing() instead of show(), and changes the route to use the second URL parameter as the :action parameter. This allows for the introduction of the :caches_page parameter in the controller, which allows us to cache views created by high_voltage.
  • Introduces module accessors and a setup method to the high_voltage module and using them in the PagesController. This allows us to change the content path to use (pages/ by default), the layout directive to use ("application" by default), and the caches_page arguments (empty list by default).
  • Includes a new generator: rails generate high_voltage:install to copy a commented-out initializer that explains the configuration options for high_voltage.

loginx commented Sep 13, 2011

Closing. Will break down into more atomic commits.

@loginx loginx closed this Sep 13, 2011


qrush commented Sep 14, 2011

Another thing that will help immensely here are tests, high_voltage itself is tested really thoroughly and these patches have none :(

loginx commented Sep 15, 2011

Yep, I agree. I made those changes originally to quickly scratch my own itch, so didn't have any tests for them, but I'm working on a set now. I'll make some pull requests once they're ready (and once they pass) but I won't have time to work on that until the weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment