...your images. Here is a quick summary of them, if you need more details read the docs. You can also use all command line options from RMagick directly if these...
white for jpeg). Side note about MiniMagick and RMagick from the Carrierwave README: MiniMagick is similar to RMagick but performs all the operations using the 'mogrify' command which...
...of the file hasn’t changed. Without a % sign, the number is to be read as a fraction, with a decimal point before it. I.e., -M5 becomes 0.5, and is...
This string array tag_list is magical in several ways: It is read from and written to a has_many association It can be manipulated in forms using...
...with its underlying association: class Note < ActiveRecord::Base include DoesListField[:topic_list] private def read_topic_list topics.collect(&:name) end def write_topic_list(list) topics.delete_all for name in...
...to lost or duplicate records. You should avoid them, or only use them to read records. Consider this: class User < ActiveRecord::Base end class Party < ActiveRecord::Base has_many :invitations...
...Firefox [v35.0.1] but not with Google Chrome [v40.0.2214.111 (64-bit)]. Even so I've read a lot of posts where people couldn't set cookies with any browser at all...
...the whole file to do so: # from the Gem's lib/gettext_activerecord/parser.rb: eval(open(file).read, TOPLEVEL_BINDING) This means that the script will be executed every time you run the...
...anonymous functions. It's API provides you some methods that help you to write readable and understandable method chains. See yourself: Example // before $('.some').show().children().doThat(); window.setTimeout(function(){
...transformed the setTimeout callback into a chainable method. Now the code is easier to read and understand. Image you need to show another node 10 seconds after the hide animation...
...an event listener with delegation .on('click', selector, handlerFn) use a library like Unpoly Read an attribute .attr(name) .getAttribute(name) Write an attribute .attr(name, value) .setAttribute(name, value...
...find some utility functions for DOM manipulation and traversal in the up.element module. Further reading JavaScript without jQuery (presentation from...
...aware of is that when you use the select method, the resulting models are read only and trying to save them will raise an exception! On the other hand the...
Many mail clients do not support external style sheets. Some even require all styling inline, which means you'll have...
...the test suite return a text with the name of the file. Otherwise super. Read the browser downloads folder Inspecting the Chrome download folder to test file downloads with selenium
Sometimes, when running a rake task, RubyGems 1.8.5 raises an error: rake aborted! undefined method `specifications' for "/usr/lib/ruby/gems/1.8":String
...content_tag :div, message, class: 'greeting' end That looks clumsy and is hard to read. Wouldn't it be nicer to say something like this? def greeting render_haml <<-HAML...
In case https://www.rubydoc.info/ is to slow or offline, you can also read a gem documentation offline. Start a server with gem server and go to http://0.0.0.0:8808/. Here...
...an Array) of element classes. Option B: Using a matcher function Since jQuery 1.4 (read: forever) you may pass a function that disects an element's class, and returns a...
...with(:state).any_of(['purchased', 'published']) } In the sunspot wiki you can also read further about scoping...
...line in that file contains the deployed branch, commit, release ID, and username (was read from the deploying user's machine): $ tail -n3 revisions.log Branch master (at da45511bea63002ac2ff002d1692e09d0dd7cb88) deployed as...
...when that release was deployed. If your release IDs are different, you can try reading the directory's modification timestamp: $ stat -c %y releases/0023...
...no peer certificate available --- No client certificate CA names sent --- SSL handshake has read 7 bytes and written 127 bytes --- New, (NONE), Cipher is (NONE) Secure Renegotiation IS NOT supported...
...transclusion function. For an in-depth introduction, see this Guide to Angular Transclusion. Also read the Angular docs on this...
...you can human-parse this one easily, crontabs with several lines are hard to read. The following command will ignore any comments or environment variables, and order rows by their...
Please note: There is a ton to configure. Check the demos and read the docs. It does not bring styles for prev/next links etc, so you need to...
...with tests and all caveats fixed. Related topic: JavaScript: Working with Query Parameters Javascript: Read params from url...
...your setup, you might need to change that file's permissions so Apache can read it...
...Using to_s will use a format that is correct but often hard to read. >> regexp.to_s => "(?mi-x:^f(o+)!)" inspect As the Ruby docs say: Perhaps surprisingly, #inspect...