This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am rossshannon on github. | |
* I am rossshannon (https://keybase.io/rossshannon) on keybase. | |
* I have a public key whose fingerprint is 87FC 879F B364 1FCF B69C 879A 1563 46E6 237D 744A | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FormElementsBuilder < ActionView::Helpers::FormBuilder | |
# This is added to the normal form builder options, by adding | |
# <%= form_for(resource, as: resource_name, url: registration_path(resource_name), builder: FormElementsBuilder) do |f| %> | |
# then call it like this: <%= f.ladda_submit_button "Sign up" %> | |
def ladda_submit_button(label, *args) | |
options = args.extract_options! | |
behaviour = options[:behaviour] || 'expand-left' | |
@template.content_tag("button", {class: "ladda-button submit", 'data-style' => behaviour }) do | |
@template.content_tag("span", label.to_s.humanize, class: 'ladda-label') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$requestedAbsoluteFile = dirname(__FILE__) . $_SERVER['REQUEST_URI']; | |
if (!preg_match('/\.html|\.php$/', $requestedAbsoluteFile)) { | |
header('Content-Type: '.mime_content_type($requestedAbsoluteFile)); | |
return false; | |
} | |
include_once $requestedAbsoluteFile; | |