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...
Imagine the following HTML structure, where the scrolling container has overflow-y: scroll: +--scrolling container+-+ | | | +-child element+----+ | | | ++iframe++ | | | | | | | | | | | | | | +-----------------------+ | | | | <-- actually cut off by | +--------+ | <-- scrolling container +-------------------+ The issue: On iOS, the child...
...a certain class if no animation is wanted. Option 1: Enable animations only for html elements with class 'animate' @app.config ['$animateProvider', ($animateProvider) -> $animateProvider.classNameFilter(/\banimate\b/) ] Option 2: Disable animations only...
{ 'text': 'Task 2' } ] And you have this template: {{task.text}} Which renders this HTML: Task 1 Task 2 If you'd like to access the scope bound to the...
Consider the following HTML & CSS: ^ img { background-color: red; } div { border: 1px solid black; } This will leave a margin of about 5px between the lower edge of the image and...
When you print out a HTML pages, all raster images (like PNGs) will appear aliased. This is because a printer's resolution is usually much higher than that of a...
Be careful when using buttons without a type attribute, since browsers will consider them the default submit button of a...
...shouldn't have any text before the doctype declaration. If you've got any HTML comments there, for example, the IE will switch to quirks mode. Finally, check if you...
Sometimes you want/have to send specific http(s) requests. You can do that easy with curl or just write the...
other_attributes_hash = { :url => ..., :method => ...,...
disable_link_option = { :before => "$('your_link_selector').html('#{escape_javascript(dummy_link)}'" } # jquery = link_to_remote(label, other_attributes_hash.merge(disable_link_option...
...into a helper called patiently do, like this: Then /^I should see "([^\"]*)" in the HTML$/ do |text| patiently do body = page.body expect(body).to have_content(text) end end
...together. For instance, the following might not work: Then /^I should see "([^\"]*)" in the HTML$/ do |text| body = page.body patiently do expect(body).to have_content(text) end end
...headers, body = response puts status # e.g. 200 puts headers.inspect # hash of headers puts body.body # html of response body Instead of Rails.application you can also call any Rack application...
If you already selected an element and want to get its parent, you can call find(:xpath, '..') on it.