patch rails sql server odbc driver

patch ODBCColumn with alias_method_chain

Here’s a quick-fix if you’re using the ODBC Adapter for Active Record gem/plugin and are getting errors with rake db:migrate when your schema includes a sql server sql_variant.

Continue Reading…

Posted by Luke on Mar 28, 2008

rails-mssql-tools update(rev. 10)

maintenance update

rev. 10 committed with:

svn ci -m "check for missing routines path; catch AR::StatementInvalid errors and send original error to STDOUT"

Posted by Luke on Mar 28, 2008

intermingle RJS partial rendering and raw javascript

wrap partial rendering in javascript

What I need is the ability to seamlessly send the contents of a partial to the client using the convenience of RJS, but wrapped inside a hand-written javascript condition (if some element exists, then update an element with this partial).

  # RJS template
  page << "if ('some_element_exists') {// page.replace_html using a partial}"

Continue Reading…

Posted by Luke on Mar 16, 2008 1 Comment(s)

mapperly

“Google maps, geocoding, and search-by-zip made easy”

Have a look at mapperly, my latest RoR project which mixes together several Rails plugins I’ve been wanting to try out.

Continue Reading…

Posted by Luke on Jan 04, 2008

mssql 2005 sqlcmd with rails migrations

“Connection is busy with results for another command” bugger

The constant struggle with db scripts in Rails migrations is side-stepping the “Connection is busy with results for another command” error when attempting to run a typical script. Here’s how I’m dealing with it using mssql 2005 and sqlcmd.

First, create config/mssql_migrate.yml as shown:


  server: myserver\sqlexpress
  database: customers

Continue Reading…

Posted by Luke on Jan 03, 2008 1 Comment(s)

rails-mssql-tools update

release 2

ActiveRecord::Base#find conditions option has been aliased to allow for Rails naming conventions against camel-cased schemas.


== CHANGELOG
2007-12-19 - 0.0.2
  - :conditions hash in ActiveRecord::Base#find is conventionalized
    Ex. find(:all, :conditions => {:user_name => 'Sam', :last_name => 'Bo'}) 
      now becomes "UserName = 'Sam' AND..."

Continue Reading…

Posted by Luke on Jan 02, 2008