Radiant CMS, disable caching in development

I am working on extension for Radiant CMS. I wanted to disable caching for development, but wasn’t able to find right method for this, so finally I did it by putting this into my extensions activate method

if RAILS_ENV=="development"
  Page.class_eval {
    def cache?
      false
    end
  }
end

This is more of a hack then a real solution, so please use comments to point me in the right direction. I’m using Radiant version 0.8.1.

Advertisements

Stripe table rows with Prototype

I’ve spend a lot of time with Prototype last few days, and this is going to be my first post related to prototype. So let’s see how to stripe the table using prototype, I think you will be surprised how easy it is.

HTML for our table will look like

Continue reading “Stripe table rows with Prototype”