authlogic plugin error/fix

I’ve seen this error lots and lots of times dealing with authlogic plugins:
rake aborted!
undefined method `add_acts_as_authentic_module’ for ActiveRecord::Base:Class
And I’ve searched on the web for answers and there’s not a really good source as to why it happens or what can be done to fix it.  Yesterday, I put an end to the error in authlogic_facebook_connect [...]


find_by_param for permalinks

A nice, clear, declarative means of doing something I’ve been writing code to do for years … find_by_param
From the README:

Find_by_param helps you dealing with permalinks and finding objects by our permalink value
class Post < ActiveRecord:Base
  make_permalink :with => :title
end
now you can do Post.find_by_param(…)
If you have a permalink-column find_by_param saves the permalink there and uses that otherwise it [...]


Handling ajax-y file uploads

I’m working on a site for a client where a user needs to upload a logo for their newly created widget.  The client wants the logo to be visible during the widget creation process (so the user can make sure the logo they’re uploading is correct).  A user can add multiple widgets all at the [...]


authlogic_oauth gotcha

I don’t want to imply by the title this is anyone’s fault but my own.  But since it took me two days to figure out, I thought I’d share.
I’m using the excellent authentication package, authlogic, for my current project.  I want to allow normal registrations through my site and also registrations using Twitter credentials.  In [...]


Rails 2.3.1+, Passenger, and Rack 1.0

Just an FYI for those of you running the latest stable Rails.
Rails 2.3.1+ depends on Rack 1.0.  In 2.3.1, it only uses the vendor’d version of Rack 1.0 (which is located under action_controller/vendor).  In 2.3.2, it can use a vendor’d version of Rack 1.0 if the gem isn’t installed in your system.  Rails 2.3.3 depends [...]


Rails running in script/console?

If you ever wanted to know if your application is running normally or in console mode, here’s the trick:
def in_console?
Object.const_defined?(:IRB)
end
This would break if you require’d IRB in your Rails application normally, though I can’t possibly imagine why you would.