Diff
Modified: trunk/app/models/network.rb (2799 => 2800)
--- trunk/app/models/network.rb 2011-11-10 14:35:11 UTC (rev 2799)
+++ trunk/app/models/network.rb 2011-11-10 14:52:03 UTC (rev 2800)
@@ -213,7 +213,7 @@
new_member_policy == :invitation_only
end
- #Returns the page_template defined for this network in settings.yml > layouts:
+ #Returns the layout defined for this network in settings.yml > layouts:
def layout_name
Conf.layouts.each do |k,v|
if v["network_id"] == id
Modified: trunk/config/default_settings.yml (2799 => 2800)
--- trunk/config/default_settings.yml 2011-11-10 14:35:11 UTC (rev 2799)
+++ trunk/config/default_settings.yml 2011-11-10 14:52:03 UTC (rev 2800)
@@ -469,6 +469,8 @@
#
# Example:
#
+#layouts:
+#
# example_layout:
# network_id: 123
# stylesheets:
Modified: trunk/lib/conf.rb (2799 => 2800)
--- trunk/lib/conf.rb 2011-11-10 14:35:11 UTC (rev 2799)
+++ trunk/lib/conf.rb 2011-11-10 14:52:03 UTC (rev 2800)
@@ -167,7 +167,8 @@
def self.layouts
#TODO: Perhaps implement code that can load different/extra settings files based on current environment
- self.fetch_entry('layouts').delete_if {|k,v| v["environment"] && (v["environment"] != ENV["RAILS_ENV"])}
+ layouts = self.fetch_entry('layouts')
+ layouts ? layouts.delete_if {|k,v| v["environment"] && (v["environment"] != ENV["RAILS_ENV"])} : {}
end
# This method is required to create an administrator in the test fixtures