...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...

github.com

jamesgolick / resource_controller at Github module ResourceController module Actions def index load_collection before :index response_for :index end

...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...

...code is is extremely performance-sensitive when you want to operate on an entire HTML document (which is hard to represent as a jQuery collection). To select descendants of a...

You know those helper methods that just render some HTML but look weird because of content_tags all over the place? You could also use Haml instead. Example

...following helper. def greeting message = ''.html_safe message << 'Welcome to ' message << content_tag(:span, Rails.env, class: 'greeting--location') content_tag :div, message, class: 'greeting' end That looks clumsy and is...

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...

...backport the rails 5 new renderer Use case Render pdfs with e.g. pdfkit from html to attach to an email or a model Generate slow reports async

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...

makandra dev

...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...

makandra dev

Installing SSL certificates usually implies additionally using intermediate certificates. If one of them is missing, some SSL client implementations might...

stackoverflow.com

...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...

makandra dev
plugins.jquery.com

...few) assumptions about your markup and is very customizable. You can basically embed any HTML into the slides, so you can mix images, videos, texts, and other stuff.

makandra dev

...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...

So you probably see the following error trace within your Passenger log file if you got here:

...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...

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

So you want to find out how many horizontal pixels you have available on a mobile device. This is super...

You know that you can use jQuery's text() to get an element's contents without any tags.

railscasts.com

See this Railscast. Basically you can simply write views like index.xlsx.erb: ID Name Release Date Price <% @products.each do |product| %> <%= product.id...

makandra dev
curl.haxx.se

When making requests using curl, no cookies are sent or stored by default. However, you can tell curl to re...