|
Archive for the ‘rails’ Category
Sunday, August 12th, 2007 by Thilo Utke
If you change the images dimensions or introduce a new version for models using file column you need a way to update the existing ones.
Here is a script that will regenerate all file column images and its version. We still look for a way to generate only new versions.
Tags: file_column, rails, regnerate-images, script Posted in Uncategorized, programmieren, rails, ruby | 7 Comments »
Wednesday, August 1st, 2007 by Thilo Utke
For aprox. 3 months we have been using mocha now. And we promised to get back to this subject when we passed our 2000th revision.
In this post I’d like to share some expirence we made while using mocha. But first a short introduction to mocha taken from the rubyforge page.
Mocha is a library for mocking and stubbing using a syntax like that of JMock, and SchMock. One of its main advantages is that it allows you to mock and stub methods on real (non-mock) classes and instances.
We started to use mocha on an existing test suite and changed our test code in place when we wrote a new test or had to update old ones. The transition was mostly painless, there were three things where we stumbled.
(more…)
Tags: mocha, mock, rails, review, ruby, stub, stubba, testing Posted in programmieren, rails, ruby | 1 Comment »
Sunday, July 29th, 2007 by Thilo Utke
Hier also ein weiteres Post zum Thema file_column Hacks.
Vor kurzem mussten wir die Anforderung umsetzen, dass Bilder, die im Netz liegen, wie eine vom Client hochgeladene Datei speichern zu können. Warum wir sowas machen wollen? In diesem Fall, um Daten von einer Anwendung über http nach autoki zu importieren. Dazu gehörten auch Bilder, die über eine URL erreichbar waren.
(more…)
Tags: file_column, hacks, ruby, web Posted in programmieren, rails, ruby | No Comments »
Tuesday, February 13th, 2007 by Alexander Lang
heute habe ich eine kleine merkwuerdigkeit bei ruby gefunden, man sehe sich mal folgenden code an:
def x
return x if (x = true)
end
def y
if (x = true)
return x
end
end
wie zu erkennen, wird in beiden faellen in der if-bedingung der variable x der wert true zugewiesen. dieser wird dann von der funktion zurueckgegeben. oder? interessanterweise gibt funktion x> einfach nur nil zurueck. hab ich was verpasst?
Tags: condition, if, programmieren, ruby Posted in Uncategorized, programmieren, rails, ruby | No Comments »
Monday, February 12th, 2007 by Alexander Lang
habe gerade einen artikel über content management systeme, die in rails geschrieben sind, gefunden. sowas kann man bestimmt immer mal gebrauchen, also poste ich das hier, um ihn spaeter wiederfinden zu koennen.
Tags: cms, content-management, rails, ruby Posted in gefunden, rails | 1 Comment »
|
|