...executed after the DOM has loaded completely. That means when the browser has finished HTML parsing and built the DOM tree. At that time, you can manipualte the DOM although...

...though the element(s) you would like to manipulate exist(s) in the delivered HTML. So you should always encapsulate DOM-manipulating javascript code in a DOM-loaded callback.

makandra dev

...Checks if the page or current node has the given text content, ignoring any HTML tags and normalizing whitespace.` (Boolean) has_css?(path, options = {}) Checks if a given CSS selector...

...the page or current node does not have the given text content, ignoring any HTML tags and normalizing whitespace. (Boolean) has_no_css?(path, options = {}) Checks if a given CSS...

github.com

...but you can always just call Oj.dump explicitely). Security warning: Oj does not escape HTML entities in JSON Be aware that Oj.dump is not aware of ActiveSupport's escape_html...

...you can wrap the output of Oj.dump(...) in an escape_json tag to escape HTML entities in Strings: myFunction(<%= escape_json OJ.dump(@data) %>) Earlier Rails versions have an unusable implementation of escape_json (it deletes...

...with the width and the div should only have the height of the picture. html: css: .outer { width: 100%; background-image: image-url('background.png'); background-size: cover; } .inner {

...you only depend on the width of the viewport, you can also use vw: html: css: .background-sizer { width: 100%; height: 60vw; background-image: image-url('background.png'); background-size: cover...

...with isolate scopes have three different variable binding strategies, of which one is =. Example: # HTML # Coffeescript @app.directive 'panel', -> scope: evaluated: '=value' bound: '=twoway' link: -> scope.evaluated # = false scope.bound = 'foo' # Updates parent.someProperty...

...HTML attributes bound with = (value, twoway) have their value evaluated as Angular expression in the parent scope's context and have the result assigned to the corresponding scope variable (evaluated...

...else -- your IDE may even be aware of it, for example RubyMine understands <<-SQL, <<-HTML, <<-XML, <<-JSON, etc and highlights correctly. Please note: Your string will end with a new...

...you can just put your heredocs strings below each other. Example: def long_messages html_escape(<<-ONE) + ' ' + html_escape(<<-TWO) Here goes my first very long message. Yeehaw! ONE

If you're using the :header_html option in PDFKit (or the corresponding --header-html option in wkhtmltopdf), and the header remains invisible, you need to add this to your...

The same applies to footers via footer_html

In order to keep the controllers directory tidy, we recently started to namespace controllers. With the :controller option you can...

makandra dev

...finished re-compiling, you will just reload the same old assets. When you render HTML without a dev server When you don't have a dev server running and call...

Consider this HTML: Even though the surrounding container defines a line-height, which vertically centers its inline elements, the check box will be top aligned if it is the only...

...element inside the container. It will be aligned correctly if the HTML looks like this: foo Complex explanation here. So the actual fix is to add some inline elements next...

...public contract path in the mailer view: Plain text email URI.join(root_url, @user.contract.url) HTML email link_to('Show contract', URI.join(root_url, @user.contract.url).to_s) Note: You need to...

makandra dev
github.com

...most Rails application layouts insert randomly rotating CSRF tokens and CSP nonces into the HTML, two requests for the same content and user will never produce the same response bytes...

makandra Curriculum

...tutorial doesn't show how to execute ruby-code that isn't rendered to HTML. To do this start a line with a dash ('-') instead of the equals-sign...

makandra dev

SiteDomain="yourdomain.de" DirData="." DNSLookup=0 Run the following to build a simple HTML page: awstats -staticlinks -config="yourdomain.de" -LogFile=your-logfile.log -output > report.html This might take a second (it...

Under certain (unknown) circumstances, Rails will give localized files an invalid content-type in the Response header. For me, after...

The step definition below allows you to write: Then I should see an HTML redirect to "http://www.makandracards.com" in the page head Capybara Then /^I should see an HTML redirect...

In Rails, you can very easily send emails with HTML and plaintext bodies. However, if you're trying to debug those using your normal email account, you might be out...

...will simply throw away the plaintext part of your mail, and just save the html part...

makandra dev

.../tmp/github.html Paste your markdown Press Ctrl-D to finalize your input Open the generated HTML file and print it.

makandra dev

db/schema.rb db/structure.sql public/system .project .idea/ public/javascripts/all* public/stylesheets/all* public/stylesheets/*.css config/database.yml *~ *#* .#* .DS_Store webrat-*.html capybara-*.html rerun.txt coverage.data coverage/* dump_for_download.dump .~lock.* .*.swp C:\\nppdf32Log\\debuglog.txt

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

blog.plataformatec.com.br

It is common in Rails 3.0 applications that you want to provide default views for a group of controllers. Let...

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

makandra dev

Sometimes you want to run a command forever, e.g. to compile a haml to html file on the console. Use this: $ while(true) do haml index.haml index.html; sleep 1.5; done

makandra dev
semaphoreci.com

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