Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require_dependency 'application'
- class AuthenticityTokenExtension < Radiant::Extension
- version "1.0"
- description "Tag which renders the form_authenticity_token, useful for integration with other rails app"
- def activate
- SiteController.class_eval {
- session :disabled => false
- def process_page_with_token(page)
- process_page_without_token(page)
- page.token = form_authenticity_token if page.class_name == "AuthenticityTokenPage"
- logger.warn "process_page_with_token executed: (#{page.token})"
- end
- alias_method_chain :process_page, :token
- }
- AuthenticityTokenPage
- end
- end
Add Comment
Please, Sign In to add comment