comparison .svn/pristine/a4/a42c48328809513f9f935c76bef600918b6947ba.svn-base @ 909:cbb26bc654de redmine-1.3

Update to Redmine 1.3-stable branch (Redmine SVN rev 8964)
author Chris Cannam
date Fri, 24 Feb 2012 19:09:32 +0000
parents
children
comparison
equal deleted inserted replaced
908:c6c2cbd0afee 909:cbb26bc654de
1 module RFPDF
2 module ActionController
3
4 DEFAULT_RFPDF_OPTIONS = {:inline=>true}
5
6 def self.included(base)
7 base.extend ClassMethods
8 end
9
10 module ClassMethods
11 def rfpdf(options)
12 rfpdf_options = breakdown_rfpdf_options options
13 write_inheritable_hash(:rfpdf, rfpdf_options)
14 end
15
16 private
17
18 def breakdown_rfpdf_options(options)
19 rfpdf_options = options.dup
20 rfpdf_options
21 end
22 end
23
24 def rfpdf(options)
25 @rfpdf_options ||= DEFAULT_RFPDF_OPTIONS.dup
26 @rfpdf_options.merge! options
27 end
28
29
30 private
31
32 def compute_rfpdf_options
33 @rfpdf_options ||= DEFAULT_RFPDF_OPTIONS.dup
34 @rfpdf_options.merge!(self.class.read_inheritable_attribute(:rfpdf) || {}) {|k,o,n| o}
35 @rfpdf_options
36 end
37 end
38 end
39
40