...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...
...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...
...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...
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:
...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...
end paths = lines.compact.sort TextMate::UI.complete(paths, :extra_chars => " ") else %x{ "$DIALOG" tooltip --html 'File /features/support/paths.rb not found.' } end Now you only need some more configuration: Name the command...
...that allows for rendering an element's original content within the directive's template: # HTML Content ... # Directive template # Result Content ... However, if you need more control over the transcludable content...
Installing SSL certificates usually implies additionally using intermediate certificates. If one of them is missing, some SSL client implementations might...
...want to "flash" the details container by hiding it and fading it back in. HTML Add a custom class to the element you want to animate, i.e. the details container...
So you probably see the following error trace within your Passenger log file if you got here:
If you have a FooController and also have a layout app/views/layouts/foo.html, Rails will use this without being told so.
...at least. This should cover most e-mails. Note that this does not affect HTML e-mails, but they should come with their custom font settings anyway...
So you want to find out how many horizontal pixels you have available on a mobile device. This is super...
See this Railscast. Basically you can simply write views like index.xlsx.erb: ID Name Release Date Price <% @products.each do |product| %> <%= product.id...
When making requests using curl, no cookies are sent or stored by default. However, you can tell curl to re...
...live('click', function() { var hash = $(this).attr('href'); var offset = $(hash).offset(); if (offset) { $('html, body').animate({ scrollTop: offset.top }, 'slow'); location.hash = hash; return false; } }); Note that this could basically work...
Simple: Tell the application controller how to handle exceptions, here a RecordNotFound error. Do this with the following line: # application_controller.rb...