The AST captures higher level structural semantics compactly, but its non-linear tree-structure makes it harder to perform standard dataflow analyses and code transformations on it, especially in the presence of blocks, exceptions, non-local breaks, non-local returns, and retries. The...
#61 Sending Email (revised) Apr 28, 2012 | 8 minutes | Mailing Thanks to Action Mailer, sending email in Rails is easy but there are several gotchas to be aware of. Here I show how to send an email upon submitting a form and the configuration options necessary. Subscribe to Watch Epis...
IronRuby is an excellent addition to the .NET Framework, providing Ruby developers with the power of the .NET framework. Existing .NET developers can also use IronRuby as a fast and expressive scripting language for embedding, testing, or writing a new application from scratch. The CL...
New in Rails Edge: Queue Posted by oscardb on April 28, 2012 — 0 comments I'm launching a new rails edge series, here's the first article: Rails Edge: Queue Comments Post a Comment Comment abilities for non registered users are currently deactivated, pending time to add a proper C...
ActionMailer::Base.smtp_settings = { :address => "smtp.gmail.com", :port => 587, :domain => "railscasts.com", :user_name => "railscasts", :password => "secret", :authentication => "plain", :enable_starttls_auto => true } ActionMailer::Base.default_url_options[:host] = "localhost:3000"...
Generating printable documents can be ridiculously hard, but it doesn't have to be. What we really need is not another special purpose application or kitchen-sink library, but a hackable platform instead. We are working hard on Prawn 1.0, which supports both high level APIs for the mo...
omniauth-twitter 0.0.11 OmniAuth strategy for Twitter install gem install omniauth-twitter Download Documentation Subscribe Stats Authors Arun Agrawal 74,775 total downloads 17 for this version Owners Links Homepage Gemfile gem "omniauth-twitter", "~> 0.0.11" Versions 0.0.11 April 28,...
Posted April 28, 2012 by schof | Comments Spree 1.0.4 has been released. This is just a minor patch release that contains several minor fixes made since the prior release. There are no security fixes contained in the release so there’s no need to upgrade unless you’re experiencing one...
I am writing a script to download warcraft 3 replays for me. It got a few (which work) then had an error: URI::InvalidURIError: bad URI(is not URI?): http://ftp.replays.net/ w3g/060607/060606_mYm]Lucifer(UD)_vs_mTw-LasH(Hum)_TwistedMeadows_RN.w3g The URL works in Safari, so I'm not su...
Unfortunately there is no easy solution to this problem. What we’ll do is keep the validation and redirect the user to a form where they can fix any problems if the validation fails when we try to save the new user. We’ll change the code in create so that if the validation fails when ...
Rack middleware is a way to filter a request and response coming into your application. In this episode I show how to modify the response body using middleware.
I'm still a believer in Agile. It's the best way I know how to take an average performing team and put them on a path to becoming a well performing team. However, I think the Agile practices also put a ceiling on how effective a team can be. Perhaps my favorite anecdote: Ola Bini beli...
Katakanaize is a rack middleware to convert hiragana to katakana.
In a certain application that I’m working on, accounts have subdomains. Nothing new. The column name I used for subdomain in the accounts table was…wait for it…subdomain! DHH’s account_location plugin , however, assumes username as the default attribute. Whatever was I to do? I liked ...
Certain members of the Ruby community feel very strongly that you should never use a package manager to install Ruby, and that you should use RVM instead. While the full list of pros and cons are outside of the scope of this page, the most basic reason is that most package managers ha...
There’s a great article on the Rails Rumble blog that explains in detail how to add OmniAuth to a Rails application. The article shows you how to create authentication from scratch, but here we’ll show you how to integrate OmniAuth into an application with an existing authentication s...
Starting with version 3.1, Rails defaults to concatenating all JavaScript files into one master .js file and all CSS files into one master .css file. As you’ll learn later in this guide, you can customize this strategy to group files any way you like. In production, Rails inserts an M...
Provides a thin wrapper around the excellent ruby-openid gem from JanRain. Be sure to install that first: gem install ruby-openid To understand what OpenID is about and how it works, it helps to read the documentation for lib/openid/consumer.rb from that gem. Prerequisites OpenID auth...
# File activesupport/lib/active_support/json/encoding.rb, line 245 def encode_json (encoder ) # values are encoded with use_options = false, because we don't want hash representations from ActiveModel to be # processed once again with as_json with options, as this could cause unexpect...
Katakanaize is a rack middleware to convert hiragana to katakana.