19 April 2014

The Ruby Reflector



  Source Favicon
On Lee Munroe 2 months ago.

How to use it (and inline CSS)

Unfortunately most email clients require your CSS to be inline. Or at least it should be inline if you want it to look right.

If you're using a marketing service like Campaign Monitor or Mailchimp, they will usually put your CSS inline for you, so you can use the email.html template as is.

If you are sending HTML emails yourself or using a transactional email service like Mailgun, you'll have to put the CSS inline first. When you're …

leemunroe.com Read
  Source Favicon
On igvita.com 3 months ago.

…is a lot going on above: we have an external CSS and JavaScript file, and inline CSS block, and two font declarations. Question: when will the font requests be triggered by the browser? Let's take it step by step:

Document parser discovers external stylesheet.css and a request is dispatched.

Document parser processes the inline CSS block which declares FontA - we're being clever here, we want the font request to go out as early as possible. Except, it doesn't. …

igvita.com Read
  Source Favicon
By Peter Cooper of Ruby Inside over 2 years ago.

…how to not only send HTML e-mail, but how to put it together (along with the obligatory inline CSS) too.

Debugging Scary Crashes of Rubinius

Dirkjan Bussink has been debugging memory corruption in Rubinius and has put together a 55 minute video explaining how he debugged it. Surely a must watch for any wannabe Rubinius hackers. A 453MB download though..

'Architecture the Lost Years' by Robert Martin at Ruby Midwest 2011

I really enjoyed this …

rubyinside.com Read
  Source Favicon
By techarch of The "Tech. Arch." over 2 years ago.

…callback function? (See back in KnockoutJS Databinding Support For Inline Templates .)

We'll update the data-binding of savings-goal-view-container in our index.html , by assigning our new sgs.mediator.savingsgoal.setupViewDataBindings function to the afterRender attribute: <div id='savings-goal-view-container' data-bind='template: { name: "savings-goal-view-template", afterRender: sgs.mediator.savingsgoal.setupViewDataBindings …

blog.monnet-usa.com Read
  Source Favicon
By Lee of Lee Munroe over 2 years ago.

Inline help

Help articles


Anchor text

Takeaways from user testing copy and content

These were the main issues we found with our copy through user testing:

The user didn't understand it due to the wording or jargon used

The user, in general, didn't read instructions on screen and preferred to just click stuff to see what happens

There was too much to read so the user didn't bother reading it

Inline help is useful, particularly for first time users …

leemunroe.com Read
  Source Favicon
On Viget.com Blogs over 2 years ago.

or inline: Post.stubs(:recent).returns(stub(:first => @ post))

Note that you can't use the shorthand if the stubbed methods require parameters.

Let's take it even further (but you probably shouldn't). A longer method chain: Post.recent.first.partial_text.upcase

can be stubbed: Post.stubs(:recent).returns(stub(:first => stub(:partial_text => stub(:upcase => 'PARTIAL TEXT'))))

However, if you find yourself writing a stub chain like this, sit back and …

viget.com Read
  Source Favicon
By Giles Bowkett of Giles Bowkett almost 3 years ago.

The technique is simple: we insert inline CSS <script> tags which set display: none; for the relevant CSS selectors. We do this, rather than a simpler $("selector").remove() , because dotjs runs your ~/.js/whichever-domain.js file when the page loads, but Twitter first loads a skeletal page and then populates it via Ajax. This updated version of the file not only removes all the specific stuff mentioned above, it even wipes out the entire dashboard div, giving an even …

gilesbowkett.blogspot.com Read
  Source Favicon
By Ed Howland of RubyLearning Blog over 3 years ago.

…number of required arguments, whereas proc will just set these to nil, or just drop any extra ones. Inline blocks behave more like procs than lambdas.

I hope you found this article valuable. Feel free to ask questions and give feedback in the comments section of this post. Thanks!

Do also read these awesome Guest Posts:

How Does One Use Design Patterns In Ruby?

Do you know what's new in Ruby 1.9?

The value of a personal bug log

Do …

rubylearning.com Read
  Source Favicon
By max of Bamboo Blog over 3 years ago.

…intuitive. While they have generally been hard to create in web apps, the introduction of canvas and inline SVG has made them a synch to put together. I see a lot of great examples of canvas and SVG that are absolutely mind-bending to look at, but very few examples which enhance the traditional applications and websites we use on a day-to-day basis.

I won't claim to have invented these, but I was reminded of how cool they are recently when I read this post: http://blog.asmartbear.com/creativity-over-optimization.html …

blog.new-bamboo.co.uk Read
  Source Favicon
By Simone Carletti of Simone Carletti's Blog almost 4 years ago.

…implementation of Unobtrusive JavaScript and the consequent removal of the old inline AJAX commands offers at least three advantages:

Less verbose, inline, behavior code in the HTML document, with the result of much more lightweight, cleaner and readable source code

Rails 3 is no longer Prototype-oriented. With Rails 3 you can easily switch from a JavaScript framework to an other.

Rails 3 code is now JavaScript framework agnostic. It no longer contains framework-specific …

simonecarletti.com Read