siphon 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34c845861e6abe5b2263f3b80f9d141018488cde
4
- data.tar.gz: 39d6aa3786df2ae75e6be3225d1494ae156ce805
3
+ metadata.gz: 0fa2d89590af45c87af2e5609edd936a60807689
4
+ data.tar.gz: 834b8f2fd7340d9eb16b149ee3c8aa09e4a08f80
5
5
  SHA512:
6
- metadata.gz: 4150765a974955d4324f8cab5858496343015e7fe8c4085d5af84b9000bc511d84195bb2f2c373e3a42f28976be02dfbbde09a304e47280e8c10df04a1f00040
7
- data.tar.gz: b5052dc2ff65f240318b7120ce51157f3dab2d85bc395e071c9ea63e4f7bdb25b972e932dedabf8d79ceb1edf2f93d8a9fb8634ea72a17778d2a21975e2c54b6
6
+ metadata.gz: 32d652b90c8802ef73e1bcbb3d6a564fc22ce8097905f4a8e838361be69ce564d9414ce315deec54cc15ea3971bfa7e61f11e46fe3836227f63c2960baf5fa57
7
+ data.tar.gz: 0942d0753f52d1c439217c0944f6768a99a9006ea5b712a6567969302162dda4209f8e363a8235de41a2c711f436938ab9a7e74445154745945cca2adb182594
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## Siphon 0.2.4 (Mar 2016)
2
+
3
+ * Fixed scopes with no argument still sending nil !
4
+ * Added `method: 'GET'` to simple_form_for generator.
5
+
6
+ ## Siphon 0.2.3 (Feb 2016)
7
+
8
+ * Generator for a controller using Siphon
9
+ * Generator for a `simple_form_for`
10
+
1
11
  ## Siphon 0.2.1 (Dec 2015)
2
12
 
3
13
  * Boilerplate only sets params (relation is left to the user)
@@ -1,4 +1,4 @@
1
- = simple_form_for @<%= file_name %>_search, url: "/admin/<%= file_name.pluralize %>" do |f|
1
+ = simple_form_for @<%= file_name %>_search, url: "/admin/<%= file_name.pluralize %>", method: 'GET' do |f|
2
2
  .col-md-3= f.input :name_cont
3
3
  .col-md-2= f.input :order_by, collection: <%= class_mate %>Search.order_by
4
4
  .col-md-2
data/lib/siphon/base.rb CHANGED
@@ -22,7 +22,9 @@ module Siphon
22
22
  scopes_hash.each do |meth, arg|
23
23
  self.relation = if arg.is_a?(Array)
24
24
  relation.send(meth, *arg)
25
- else
25
+ elsif arg.nil?
26
+ relation.send(meth)
27
+ else
26
28
  relation.send(meth, arg)
27
29
  end
28
30
  end
data/lib/siphon/nil.rb CHANGED
@@ -5,7 +5,7 @@ module Siphon
5
5
 
6
6
  # if the value is false
7
7
  def coerce(value)
8
- [nil, "", "0", "false", "f", "F"].include?(value) ? nil : 1
8
+ [nil, "", "0", "false", "f", "F"].include?(value) ? nil : value
9
9
  end
10
10
 
11
11
  end
@@ -1,3 +1,3 @@
1
1
  module Siphon
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: siphon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Sistovaris
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-08 00:00:00.000000000 Z
11
+ date: 2016-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport