adva-core 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@ class BaseController < InheritedResources::Base
|
|
5
5
|
begin_of_association_chain :site
|
6
6
|
tracks :resource, :resources, :collection, :site => %w(.title .name .sections)
|
7
7
|
|
8
|
-
layout
|
8
|
+
layout :layout
|
9
9
|
helper_method :site
|
10
10
|
|
11
11
|
mattr_accessor :sortable
|
@@ -35,6 +35,10 @@ class BaseController < InheritedResources::Base
|
|
35
35
|
|
36
36
|
protected
|
37
37
|
|
38
|
+
def layout
|
39
|
+
'default' unless params[:format] == 'atom'
|
40
|
+
end
|
41
|
+
|
38
42
|
def sort(collection, order)
|
39
43
|
if !self.class.sortable?(order)
|
40
44
|
collection
|
@@ -37,7 +37,7 @@ module RoutingFilter
|
|
37
37
|
|
38
38
|
def recognition(host)
|
39
39
|
if site = Site.by_host(host) and root = site.sections.root
|
40
|
-
[%r(^(/[\w]{2})?(?:\/?)(#{anchors.join('|')}|\.|\?|/?\Z)), "/#{root.type.tableize}/#{root.id}"]
|
40
|
+
[%r(^(/[\w]{2})?(?:\/?)(?:index)?(#{anchors.join('|')}|\.|\?|/?\Z)), "/#{root.type.tableize}/#{root.id}"]
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
data/lib/adva_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adva-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 9
|
10
|
+
version: 0.0.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ingo Weiss
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-02-
|
19
|
+
date: 2011-02-28 00:00:00 +01:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -588,7 +588,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
588
588
|
requirements: []
|
589
589
|
|
590
590
|
rubyforge_project: "[none]"
|
591
|
-
rubygems_version: 1.
|
591
|
+
rubygems_version: 1.4.2
|
592
592
|
signing_key:
|
593
593
|
specification_version: 3
|
594
594
|
summary: Core engine for adva-cms2
|