ecm_opening_times 0.0.2 → 0.0.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 569b734f51ec9a5fe7e2ccba064fb2db30a5d9f2
|
4
|
+
data.tar.gz: 3ddf6427c88cd4a17d3ffe53b759a76482ac63ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ff3b938c25bc43aef8abe7ac8118ad290e629b6dbfd2cf565bd39f28beed1544cd6f9fac29c3de877b575db307053832043f3f83203ea439f0abdd4368ade8c
|
7
|
+
data.tar.gz: be869ca4c431782e9596bac49136b5dd03fee1cb8bc8516d9c58ced666940ff73db62b1539292732ee84527a35341f137f4f7aed392193e75a5efe93d161695d
|
@@ -1,8 +1,14 @@
|
|
1
1
|
module Ecm
|
2
2
|
module OpeningTimes
|
3
3
|
module ApplicationHelper
|
4
|
-
def opening_times
|
5
|
-
|
4
|
+
def opening_times(options = {})
|
5
|
+
options.reverse_merge(branches: nil)
|
6
|
+
case options[:branches]
|
7
|
+
when Array, Symbol, String
|
8
|
+
@branches = Ecm::OpeningTimes::Branch.where(identifier: options[:branches]).all
|
9
|
+
else
|
10
|
+
@branches = Ecm::OpeningTimes::Branch.all
|
11
|
+
end
|
6
12
|
render partial: 'ecm/opening_times/branches/opening_times', locals: { branches: @branches }
|
7
13
|
end
|
8
14
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_opening_times
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|