...form_for @user, :prefix => 'overlay' do |form| = form.text_field :email and get this as HTML: <input name="user[email]" id="overlay_user_email" (...) /> You can also put a :prefix into...

stackoverflow.com

#{link_to "label", "url"}! Haml is a great engine for writing shorter, readable HTML. However, there is one thing that troubles me regularly. Consider this Haml code: %p

With defaults, RCov doesn't work the way you how you would like it to. To create a nice test...

makandra dev

This is about converting Haml to ERB and not the other way round which you probably want! This process can...

semaphoreci.com

Capistrano 3 is a major rework of the framework and requires several adjustments to your deploy configuration files. The biggest...

github.com

...be rendered by calling JST['path/to/template'](template: 'variables'): Hello, <%= name %> ! // application.js //= require templates/hello $("#hello").html(JST["templates/hello"]({ name: "Sam" })); Whatever is in the <%...

...%> is evaluated in Javascript. You can also...

...forever, even if the $element variables go out of scope. Note that jQuery's html() method explicitely traverses through all removed elements in order to clean up the jQuery Cache...

...body').html(''); Detached elements cannot be collected if they have data or event handlers Let's say that you create a DOM element through jQuery, set a data attribute on...

...chain function calls to the promise using .then(), without needing to wait for the HTML request to actually return. The promise will collect all functions passed to then() and invoke...

makandra dev

+buttons-sprite("blue-button", false, x-offset, y-offset) Spacing When your HTML element is larger than the image you're using, other images in the same sprite...

...visible or hidden, we always expect the given text to be contained in the HTML. The test is about whether or not it is hidden via CSS.

for(let key of stylesheetsContext.keys()) { stylesheetsContext(key) } // webpack_source_path/application/stylesheets/main.sass @import 'font_faces' html font-family: MyFont, Arial // webpack_source_path/application/stylesheets/_font_faces.sass @font-face font-family: 'MyFont' src: url('../fonts/my_font.ttf...

...Rails project directory call regularly: geordi remove-executable-flags Runs chmod -x on Ruby, HTML, CSS, image, Rake and similar files. This script is part of our geordi gem on...

...text, you can use it with regular rails form like this: - form_for @signature, :html => { :class => 'signature_form' } do |form| %dl %dt = form.label :name %dd = form.text_field :name %dt = form.label...

...our applications. There are many ways to achieve this, from SVGs inlined into the HTML, SVGs inlined in CSS, JavaScript-based solutions, to icon fonts. Out of all these options...

...produces the desired result. vertical-align: text-bottom margin-bottom: -.1em Now, in your HTML, you can add an icon with Icon names are simply the file names of the...

rubyforge.org

...came up with was to replace all occurrences of UTF-8 chars with their HTML entities (so "ü" instead of "ü" etc...

...app01-prod: Processing by Users::SessionsController#new as HTML 01 app01-prod: Rendering devise/sessions/new.haml within layouts/signed_out 01 app01-prod: Rendered devise/sessions/new.haml within layouts/signed_out (4.8ms) 01 app01-prod: Rendered layouts/shared/_head.haml...

makandra dev
blog.getbootstrap.com

...they do nearly everything wells, thumbnails, and panels did, only better. Consolidated all our HTML resets into a new module, Reboot. Reboot steps in where Normalize.css stops, giving you more...

...to the of your layout so the feed can be auto-discovered by browsers: %html %head %link{ :href => feed_url, :rel => "alternate", :type => "application/rss+xml", :title => "RSS feed...

...from a list. Don't find on elements from a list. Background Consider this HTML: Hello World Lorem ipsum... Hello Universe Lorem ipsum... Now let's say you obtain a...

...if @with_full_urls Note that while this is enough for links in your HTML, it does not affect asset paths like the host enforcement trait does. So it's...

cssdiscussion.com

Define a stylesheet for mobile devices Using the media attribute on stylesheet HTML tags allows you to have a CSS for mobile browsers: <%= stylesheet_link_tag 'mobile', :media...

Clearfix is a hack to clear floating elements without additional HTML markup. If you only need to support IE8 and above, a great clearfix with few side effects is:

api.jquery.com

...pattern, you can do that. For example, consider a DOM node for the following HTML. We'll reference it by $element below. Option A: Selecting classes, then removing them

...bug that hits me once in a while. It usually occurs in sliders with HTML content. The issue When a slider contains a composited[1] element, the element will overlap...