Commit 53d7eb88404f66c872a24412a1a679b860968140
1 parent
75656f42
Exists in
master
and in
22 other branches
r246@sede: terceiro | 2007-07-29 18:45:14 -0300
ActionItem0: minor doc work git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@250 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
10 additions
and
20 deletions
Show diff stats
vendor/plugins/design/lib/acts_as_design.rb
| 1 | class ActiveRecord::Base | 1 | class ActiveRecord::Base |
| 2 | 2 | ||
| 3 | # declares an ActiveRecord class to be a design. The class is automatically | 3 | # declares an ActiveRecord class to be a design. The class is automatically |
| 4 | - # associated with a +has_many+ associationto Design::Block. | 4 | + # associated with a +has_many+ relationship to Design::Box. |
| 5 | # | 5 | # |
| 6 | # The underlying database table *must* have a column named +design_data+ of | 6 | # The underlying database table *must* have a column named +design_data+ of |
| 7 | # type +text+. +string+ should work too, but you may run into problems | 7 | # type +text+. +string+ should work too, but you may run into problems |
| @@ -28,34 +28,28 @@ class ActiveRecord::Base | @@ -28,34 +28,28 @@ class ActiveRecord::Base | ||
| 28 | def design_data | 28 | def design_data |
| 29 | self[:design_data] ||= Hash.new | 29 | self[:design_data] ||= Hash.new |
| 30 | end | 30 | end |
| 31 | - | ||
| 32 | - # :nodoc: | ||
| 33 | - def template | 31 | + |
| 32 | + def template # :nodoc: | ||
| 34 | self.design_data[:template] || 'default' | 33 | self.design_data[:template] || 'default' |
| 35 | end | 34 | end |
| 36 | 35 | ||
| 37 | - # :nodoc: | ||
| 38 | - def template=(value) | 36 | + def template=(value) # :nodoc: |
| 39 | self.design_data[:template] = value | 37 | self.design_data[:template] = value |
| 40 | end | 38 | end |
| 41 | 39 | ||
| 42 | - # :nodoc: | ||
| 43 | - def theme | 40 | + def theme # :nodoc: |
| 44 | self.design_data[:theme] || 'default' | 41 | self.design_data[:theme] || 'default' |
| 45 | end | 42 | end |
| 46 | 43 | ||
| 47 | - # :nodoc: | ||
| 48 | - def theme=(value) | 44 | + def theme=(value) # :nodoc: |
| 49 | self.design_data[:theme] = value | 45 | self.design_data[:theme] = value |
| 50 | end | 46 | end |
| 51 | 47 | ||
| 52 | - # :nodoc | ||
| 53 | - def icon_theme | 48 | + def icon_theme # :nodoc: |
| 54 | self.design_data[:icon_theme] || 'default' | 49 | self.design_data[:icon_theme] || 'default' |
| 55 | end | 50 | end |
| 56 | 51 | ||
| 57 | - # :nodoc: | ||
| 58 | - def icon_theme=(value) | 52 | + def icon_theme=(value) # :nodoc: |
| 59 | self.design_data[:icon_theme] = value | 53 | self.design_data[:icon_theme] = value |
| 60 | end | 54 | end |
| 61 | end | 55 | end |
vendor/plugins/design/lib/design.rb
| @@ -42,17 +42,13 @@ module Design | @@ -42,17 +42,13 @@ module Design | ||
| 42 | Design.instance_variable_set('@design_root', dir) | 42 | Design.instance_variable_set('@design_root', dir) |
| 43 | end | 43 | end |
| 44 | 44 | ||
| 45 | - # :nodoc: | ||
| 46 | - # | ||
| 47 | # used for testing | 45 | # used for testing |
| 48 | - def Design.public_filesystem_root | 46 | + def Design.public_filesystem_root # :nodoc: |
| 49 | Design.instance_variable_get('@public_filesystem_root') || File.join(RAILS_ROOT, 'public') | 47 | Design.instance_variable_get('@public_filesystem_root') || File.join(RAILS_ROOT, 'public') |
| 50 | end | 48 | end |
| 51 | 49 | ||
| 52 | - # :nodoc: | ||
| 53 | - # | ||
| 54 | # used for testing | 50 | # used for testing |
| 55 | - def Design.public_filesystem_root=(value) | 51 | + def Design.public_filesystem_root=(value) # :nodoc: |
| 56 | Design.instance_variable_set('@public_filesystem_root', value) | 52 | Design.instance_variable_set('@public_filesystem_root', value) |
| 57 | end | 53 | end |
| 58 | 54 |