Joined September 2012
·
Posted to
Fast-clickable buttons on mobile web apps
over 1 year
ago
Tested it in my default browser on Android 4.1.1 (Samsung Galaxy Nexus). Every click on the fast-button (or fast-link) resulted in two submissions instead of one.
Posted to
Set staging environment email to go to a single email address
over 1 year
ago
An even better way (in my opinion) is to use an interceptor. Check out the "Interceptors" section of the ASCIIcast here: http://railscasts.com/episodes/206-action-mailer-in-rails-3?view=asciicast
Posted to
AssociationCountValidator
over 1 year
ago
I had a similar question I posted on StackOverflow last year. I included my own implementation there: http://stackoverflow.com/questions/5932509/rails-validating-at-least-one-habtm-relationship
Yours definitely looks more concise, and I see it takes into account records that are marked for deletion, which mine does not.
Achievements
156 Karma
4,259 Total ProTip Views
Lemmings 100
Write something great enough to have at least 100 watchers of the project
Forked 20
Have an established project that's been forked at least 20 times
Mongoose 3
Have at least three original repos where Ruby is the dominant language
Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos
Forked
Have a project valued enough to be forked by someone else
Charity
Fork and commit to someone's open source project in need
Python
Would you expect anything less? Have at least one original repo where Python is the dominant language
Mongoose
Have at least one original repo where Ruby is the dominant language
Cub
Have at least one original jQuery or Prototype open source repo
Kona
Have at least one original repo where CoffeeScript is the dominant language
One of the things I like about Ruby is how elegantly code can be written, specifically with regards to it reading like a sentence. I would steer clear of this personally, as it's pretty confusing not only for the lack of readability of the line in general, but also because it is contradicts the expected patterns and usage that come with the tap method.