formwandler 0.3.1 → 0.3.2

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: f9d6cfc5b1013e3204f17c536b1d487df7afe83e
4
- data.tar.gz: e11b639f71da8ea99e114dfbc89dbaf1c334ba6d
3
+ metadata.gz: cbcfa692b0b2886514b99ee795fc03836e84215a
4
+ data.tar.gz: e0664f8b3de025fe370a9db51a880e2ac3eb41e2
5
5
  SHA512:
6
- metadata.gz: 3c1350ec9865df57a2f049d16d3bdc86817128ad8078636046198e038c59912d54b250899a7be1f3c07b33f7dc7a835dd448ef9ea41779a68566c227d350fa9a
7
- data.tar.gz: adbfc536119e99a772827ed26718f342d4cd0deb836453db5e69d553f141cae62218d6402e8741d222bfab21514dc4cd8fa51b1ebe1033626a40cf73382a4125
6
+ metadata.gz: 04dba1cf18f594390fa712984d2a5e538735248d9e52dda7a6dcd3731c3cf59cab55f3dbf05bb7f2130b773890c0910f28401eb629091c6670ee3a97df27e9fe
7
+ data.tar.gz: 97daaad16c38cea2411baf75506d89c8cc34b176cd096f579d2c2a1f53b9250e537daf486bc7385d8b0cfd827c487323c7b9ed05393576df3f9a76102333bf1f
@@ -22,7 +22,7 @@ module Formwandler
22
22
  end
23
23
 
24
24
  def form_class_name
25
- "#{inferred_resource_name}_form".camelize
25
+ "#{namespace}::#{inferred_resource_name.camelize}Form"
26
26
  end
27
27
 
28
28
  def form_class
@@ -30,7 +30,11 @@ module Formwandler
30
30
  end
31
31
 
32
32
  def form_instance_name
33
- form_class_name.underscore
33
+ "#{inferred_resource_name}_form"
34
+ end
35
+
36
+ def namespace
37
+ self.class.name.split('::')[0..-2].join('::')
34
38
  end
35
39
 
36
40
  def inferred_resource_name
@@ -1,3 +1,3 @@
1
1
  module Formwandler
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formwandler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Bilharz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-08 00:00:00.000000000 Z
11
+ date: 2017-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails