site_framework 4.0.1 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b4252d95379b102c247dc309c261d045fe84937
4
- data.tar.gz: 68c40e49d6cff491ca81c2f57253753d0fa986b6
3
+ metadata.gz: 154edfb2dab5c5bb42f28dc9f7a9093e50354120
4
+ data.tar.gz: 76b660d2ca27b37a5672291090dcbc483d2b33ff
5
5
  SHA512:
6
- metadata.gz: 040026c637f50af1f17a72eec6ea6df09d99e508cf0805eeb47e15d6037d30eef3a7669aed08610264a07bcda4efc70e20690c10c9a57c026234d74ee4b7e438
7
- data.tar.gz: 7f68cb7cf99211f460a8069e670e66ddc4cc7e550581376308b70320ace6f17970ee19db341f942ba27ec753c8cf690299099f892d3c96da022f48815f7852d2
6
+ metadata.gz: 64dc5b007c5e48fc333f09046ad816f4338f0abe2fd52358d4346f31ca7a4dacc34287ea265259d6dc4b3b7a15c74400b0207c510233c8b848b34d61df9f3e1f
7
+ data.tar.gz: d325071a5bf298f9682a6789519e7f373196f3a3507bd135b9cfec30523df9a4763446ce69f6756ee7e44713924430a1bed3da86e3513afa5d1fdbee08dec6b5
@@ -3,10 +3,11 @@ ActionController::Base.class_eval do
3
3
  private
4
4
 
5
5
  def set_template_path
6
- if request.site
6
+ if request.respond_to?(:site) && request.site
7
7
  # We are in site namespace
8
8
  unless request.site.default_template.blank?
9
- prepend_view_path "app/views/#{request.site.default_template}"
9
+ prefix = SiteFramework::Engine.view_path_prefix
10
+ prepend_view_path "#{prefix}/#{request.site.default_template}"
10
11
  end
11
12
  end
12
13
  end
@@ -10,9 +10,13 @@ module SiteFramework
10
10
  end
11
11
 
12
12
  @@default_domains = ['localhost']
13
-
14
13
  mattr_accessor :default_domains
15
14
 
15
+ # This option allows developers to specify the prefix of path
16
+ # which they wanted to prepend to view_paths array
17
+ mattr_accessor :view_path_prefix
18
+ @@view_path_prefix = "app/views"
19
+
16
20
  def self.setup
17
21
  yield self
18
22
  end
@@ -1,3 +1,3 @@
1
1
  module SiteFramework
2
- VERSION = '4.0.1'
2
+ VERSION = '4.1.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: site_framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sameer Rahmani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-17 00:00:00.000000000 Z
11
+ date: 2016-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties