So after a lot of work (mostly done by the three other members of the team – Richard White, Lance Ivy and Ed Moss) the new shiny version of AjaxScaffold has reached RC1 and is available under its new name ActiveScaffold.

Richard White gives a bit more info about it on his blog.

This will pretty much draw to a close this blog being used for the docs as AjaxScaffold will get an EOL stamp once ActiveScaffold reaches v1.0. So thank you to all who have given us feedback and supported the project so far.

I haven’t had much cause to play with the Time module in Ruby until today. I have used Time.now quite a bit, but not too much more than that. However, today I had to find the last 6 months names to label a graph and in a short period of time I had come up with this:

months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
labels = []
0.upto(5) do |x|
  labels.unshift(months[Time.now.months_ago(x).month-1])
end

Which I think is pretty neat, especially remembering what a pain it was in Perl last time I had to do it……..

Feb 012007

I’m not entirely sure how this has happened, I suspect that RailsPlayground has moved to 1.2.1 (without telling anyone), but it appears that this blog no longer has styles………

Brilliant. My apologies.

Anyway, gonna freeze to 1.1.6 for the mo, so hopefully that should fix it.

We released a new version of AS today which fixes the issues with prototype and rico when using Rails 1.2.1. For details of the issue you can see my previous post.

This is simply a fix for the v3 plugin and contains none of the new (and very exciting stuff) coming in v4. It should be a straight upgrade for anyone on 3.2.2.

There is an issue with the latest release of Rails and AjaxScaffold. Well actually the problem is in a conflict between Prototype and Rico Corner, if you find that all the AJAX stops working – lots of spinning indicators and not much else you have three choices, wait a little and we will likely release an update, or if you are impatient / desperate for a fix you can use the following patch for prototype or you can remove the Rico Corner include……

Continue reading »

Jan 162007

So, it turns out the Amazon links thing is actually ok on the individual post pages, just not here on the main page of the site. I guess that in any indiviual post the relative frequencies of words are sufficient to mean the algorithm is effective. Whereas here the dilution of many posts means it harder to get right.

I still th ink it could be a lot better though, not like they are short of cash or developers!!!!

I was pointed to a couple of very interesting services over the weekend that attempt to cluster people around the sites they are currently visiting.

They are InCircles and Medium. The former is something you install in your site (see the sidebar) and it allows people to chat while visiting it (to you or each other), the later is an extension to your browser that shows friends and other bits and pieces for the site you are visiting. Sort of site based dynamic social networks.

I have to admit though I still haven’t really got my head around Me.dium (although it looks like it might do something quite clever!!!), the InCircles client on the other hand is pretty transparent and easy to use. Interesting concepts.

Nov 282006

So a couple of weeks ago we (Cominded) put up RailsPays, a free job board for Rails jobs in the UK. These can be anything – full time, part time, contract, etc so long as they are to do with Rails. I have to admit the idea was driven by the trouble we have had finding developers to join us and, well it has worked. A week or so ago we hired Matt Mower from the first post we put up……..

There are now a couple more jobs up there too (along with ours and we are still looking), but space for plenty more!!!

Amazon have a (beta) feature called Self-Optimizing Links which can be seen in the Books section of the sidebar on my blog. This is supposed to chose books to display by parsing the content of the site – so I thought I would give it a go and see how good the optimization really is.

So far I have discovered that somewhere out there is a Scott Rutherford who writes travel books about Asia, and therefore that “Japan by Rail” is more appropriate than any books actually on Rails…….. Hence the links so far are not really relevant.

Early days yet though. So, the experiment continues.

I”ve been asked a couple of times how to dynamically setup the columns displayed by the AS plugin dependant on the permissions of the user, so I though a quick post would be a good idea.

Basically its very simple, you simply define a hash of all the columns you potentially wish to display keyed by the column name, so something like:

@@columns_hash[:user] = ScaffoldColumn.new(..)
@@columns_hash[:foo] = ScaffoldColumn.new(:name => 'bar')

Then define a before_filter along the lines of:

before_filter :create_columns, :o nly => ['table', 'update_table']

Continue reading »