Read my latest article: Planet Argon Blog (posted Wed, 17 Feb 2010 15:11:00 GMT)

RailsOnPg released

Posted by Robby Russell Wed, 21 Oct 2009 22:07:00 GMT

3 comments Latest by replica pandora jewelry Thu, 11 Mar 2010 06:20:12 GMT

Hello fellow PostgreSQL and Ruby on Rails geeks,

Alexander Tretyakov (twitter) recently released a plugin for Ruby on Rails, which extends migrations and provides you with the ability to create.

While you can already do something like this with execute in your migrations:

execute("CREATE VIEW my_tasty_snacks AS SELECT * FROM snacks WHERE food = 'Tasty';")

With RailsOnPage, you’re provided a DSL so that you can do the following:

create_view :my_tasy_snacks do |view|
  view.select     '*'
  view.from       'snacks'
  view.conditions 'food' => 'Tasty'
end

note: I haven’t tested the above, just a hypothetical example

Anyhow, if you’re in the habit of using views, functions, or triggers with your PostgreSQL database and are using Ruby on Rails, you might give RailsOnPg a whirl.

Subscribe to my RSS feed Enjoying the content? Be sure to subscribe to my RSS feed.
Comments

Leave a response

  1. Avatar
    Omar Qureshi Wed, 28 Oct 2009 08:51:35 GMT

    Gotta say, I still prefer writing the SQL for the create table/view/function/trigger.

  2. Avatar
    susan Wed, 10 Feb 2010 12:20:12 GMT

    UGG boots are wholesale ugg boots made of 100%Australian merino sheepskin. discount ugg boots This is why UGG boots are so warm. The finest sheepskin UGG company uses is the key point of the good quality of UGG boots. And you can even wear UGG boots in summer, discount ugg cardy boots for this material can eject sweat and make your feet cool. This is very miraculous.

  3. Avatar
    replica pandora jewelry Thu, 11 Mar 2010 06:20:12 GMT

    nice post , I have learn many information from here

Share your thoughts... (really...I want to hear them)

Comments