Sha256: fc8330ea314982e1cf9b07d710098207064cd04716114047e04fef66950871b2

Contents?: true

Size: 608 Bytes

Versions: 3

Compression:

Stored size: 608 Bytes

Contents

require 'crystal/html'
require 'crystal/router'

module Crystal
  # View helpers
  [BasicHtmlHelper, FormHelper, JavascriptHelper, ViewUrlHelper].each do |helper|
    ControllerContext.inherit helper
  end  
    
  # Controller helpers  
  [RoutingHelper, FlashHelper, ControllerUrlHelper].each do |helper|
    AbstractController.inherit helper
  end  
  
  # TODO2 refactor it!
  [
    :special_url, :url_for, :persist_params, :dont_persist_params, 
    :default_path, :return_to_path,
    :flash,
    :redirect_to, :reload_page
  ].each do |m|
    ControllerContext.delegate m, :to => :controller
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
crystal-0.0.13 lib/crystal/html/include_into_controller.rb
crystal-0.0.12 lib/crystal/html/include_into_controller.rb
crystal_ext-0.0.11 lib/crystal/html/include_into_controller.rb