It is easy to add wrappers for input components in simple_form, but it takes some time to modify rendering of buttons ("f.button").
We want to have this in our form:
= f.button :submit_cancel, 'Save'
| module Financeiro | |
| # Inclui suporte para escrever em um campo com valor monetário | |
| # utilizando BigDecimal, ou valor em string seguindo sintaxe | |
| # do jQuery MoneyMask | |
| # | |
| # Para habilitar em um model é preciso primeiro fazer um include no model: | |
| # include MoneyAttribute | |
| # | |
| # Defina cada um dos campos que você quer que tenham o comportamento: |
This is a helper function that will convert a given PDF file blob into text, as well as offering options to save the original PDF, intermediate Google Doc, and/or final plain text files. Additionally, the language used for Optical Character Recognition (OCR) may be specified, defaulting to 'en' (English).
Note: Updated 12 May 2015 due to deprecation of DocsList. Thanks to Bruce McPherson for the getDriveFolderFromPath() utility.
// Start with a Blob object
var blob = gmailAttchment.getAs(MimeType.PDF);
This gist illustrates how you would add Google Analytics tracking into your Rails mailers. Add the tracking_interceptor.rb into your path and enable it for your mailers with:
register_interceptor TrackingInterceptor| # place the contents of this file in, e.g., spec/re_run_friendly_formatter.rb | |
| # | |
| # and in .rspec: | |
| # | |
| # --format ReRunFriendlyFormatter | |
| require "rspec/core/formatters/progress_formatter" | |
| class ReRunFriendlyFormatter < RSpec::Core::Formatters::ProgressFormatter | |
| RSpec::Core::Formatters.register self, :dump_summary |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |