Too Cool for Internet Explorer

Fancy Zoom

fancy-zoom

fancy zoom logo

Fancy Zoom is a great way of adding zoom capabilities to your website in a blink of an eye.
Javascript powered and cross-browser compatible.

Have a look at the demo-site!

To add fancy zoom to your site do the following easy steps:

1. Download Fancy Zoom over at cabel’s place
2. add upload the contents of the package to your webroot
3. add the following javascript files to your html pages:



4. enable the body to load the neccesary javascript stuff:

and you’re done!
from now on, every link to an image becomes zoomed. Even text-links to images!

thank you cabel for this great addition!

- Nils

acts_as_ferret on associations

acts_as_ferret-on-associations

Just before anyone else runs into this §$%&/, I’ll do a quick post:

Let’s assume you have a rails app, want to add full-text search via Jens’ great acts_as_ferret(ferret) plugin and you’d also like to have attributes from multiple models in ONE index. In this case you probably found the same resources on the net as I did:

All of these are really great tutorials, with just a little flinch that I (!!) missed the whole day:

THEY all have one to one or one to many associations, but in any case do the cross indexation on the model which has exactly one associated row, with something like this:


class Book < ActiveRecord::Base
acts_as_ferret :additional_fields => [:author_first_name,
:author_surname]
belongs_to :author
###
def author_first_name
return author.first_name
end
###
def author_surname
return author.surname
end
end

I (!!) did the whole thing on the model which can have multiple associated items on it and (i know this may be a little embarassing) missed the following line, wondering how this could possibly work for ME in the first place, because of the magic-undefined-instance variable:


def job_title
return job.title
end

What you have to do is this:


def job_title
jobs.collect { |job| job.title }.join ' '
end

Note the plural in here - I’ll give you a sec - and now you’re probably laughing ;)

So - as i said, just in case - I wanted to share this little secret with those people out there, beeing as rubber ducked as me.

cheers, Nils

Theme updates

theme-updates

first geekery! *hooray*

also bevor man hier überhaupt ANFANGEN kann zu bloggen musste erstmal das Theme auf den aktuellsten hip-web-zwonull-mega-standard gebracht werden. Einmal mit Profis arbeiten ne?! ;)

Falls jemand ‘mal von seinem Wordpress die Meldung bekommen sollte “Your theme is not widgetized” der folge einfach folgenden einfachen Anweisungen:

Eure sidebar sieht wahrscheinlich etwa so aus:

Powered by WordPress with GimpStyle Theme design by Horacio Bella. Get Entries and comments.