// app/assets/stylesheets/modules/_action_button.css.ass
Button style usually used for call to actions::
<button type="button" class="***m-action_button***">Action button</button>
<a class="***m-action_button***">Action button</a>
// -- datepicker -- | |
// booking | |
$('#booking_start_date').datepicker({ | |
onSelect: function(dateText, inst) { | |
$('#booking_end_date').datepicker("option", 'minDate', new Date(dateText)); | |
}, | |
beforeShowDay: disableUnavailableDays, | |
dateFormat: 'dd-mm-yy' | |
}); | |
$('#booking_end_date').datepicker({ |
@mixin input-placeholder($color) | |
&.placeholder | |
color: $color | |
&:-moz-placeholder | |
color: $color | |
&::-webkit-input-placeholder | |
color: $color |
require 'rubygems' | |
require 'yaml' | |
YAML::ENGINE.yamler = 'psych' | |
Dir["**/*.yml"].each do |file| | |
puts file | |
YAML.load_file file | |
end;0 |
# I find myself constantly wanting to check whether one string is included within an array of strings. | |
# It is certainly possible (and also fast) to do that in Ruby with something like this: ["foo", "bar"].include?("foo") | |
# But I don't think it reads very nice :( | |
# Because what I actually want to test is, whether my string is included in the array and NOT the other way around. | |
# - Do you have the same problem? | |
# - What do you think about the following two solutions? | |
class String | |
# create a new method |
curl -v -H "Accept: text/javascript, text/html, application/xml, */*" http://localhost:3000/places/12356-apartment-berlin-prenzlauerberg/calendar\?for_date\=2012-05-01 | |
* About to connect() to localhost port 3000 (#0) | |
* Trying 127.0.0.1... connected | |
* Connected to localhost (127.0.0.1) port 3000 (#0) | |
> GET /places/12356-apartment-berlin-prenzlauerberg/calendar?for_date=2012-05-01 HTTP/1.1 | |
> User-Agent: curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3 | |
> Host: localhost:3000 | |
> Accept: text/javascript, text/html, application/xml, */* | |
> | |
< HTTP/1.1 200 OK |
$ -> | |
jquery_ui_classes = [".ui-tabs", ".ui-tabs-nav", ".ui-tabs-panel", ".ui-widget", ".ui-widget-header", ".ui-widget-content", ".ui-corner-all", ".ui-corner-top", ".ui-corner-bottom", ".ui-helper-clearfix", ".ui-helper-reset", ".ui-state-default"] | |
$(".js-tabs").tabs().each -> | |
# removes all the jquery-ui specific classes (except ones like ui-state-active) | |
$elements = $(this).find( jquery_ui_classes.join(", ") ).andSelf() | |
$elements.removeClass( jquery_ui_classes.join(" ").replace(/\./g, "") ) |
.icons-sprite | |
.icons-ad | |
.icons-add-small | |
.icons-add-tiny | |
.icons-ae | |
.icons-af | |
.icons-ag | |
.icons-ai | |
.icons-al | |
.icons-alert-error |
// Sass v3.2.5 | |
.context-a, .context-b | |
border: 1px | |
.some-class | |
color: red | |
.another-class | |
color: blue |
module DiscourseSso | |
module ControllerExtensions | |
def self.included(klass) | |
klass.append_before_filter :ensure_sso_login | |
end | |
private |