|
Revision 1258, 379 bytes
(checked in by gaspard, 2 months ago)
|
commit a0a697ffbe71e55929c5f7b92bc61a8a5f7de9df
Author: Gaspard Bucher <gaspard@teti.ch>
A lot of files moved around to ease extending zena by writing bricks.
|
| Line | |
|---|
| 1 |
module Zena |
|---|
| 2 |
|
|---|
| 3 |
class BadConfiguration < Exception |
|---|
| 4 |
end |
|---|
| 5 |
end |
|---|
| 6 |
|
|---|
| 7 |
class ActiveRecord::Base |
|---|
| 8 |
def self.act_as_content |
|---|
| 9 |
class_eval do |
|---|
| 10 |
def preload_version(v) |
|---|
| 11 |
@version = v |
|---|
| 12 |
end |
|---|
| 13 |
|
|---|
| 14 |
def version |
|---|
| 15 |
@version ||= Version.find(self[:version_id]) |
|---|
| 16 |
end |
|---|
| 17 |
end |
|---|
| 18 |
end |
|---|
| 19 |
end |
|---|
| 20 |
|
|---|
| 21 |
load_patches_from_bricks |
|---|