cambium 1.1.4 → 1.1.5

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: e1663a3f0a7ad2688d2a012e2167e7f1cf99fe3d
4
- data.tar.gz: aabed29bb2d314ef2ff7f3e80f189387c6c2e145
3
+ metadata.gz: 76f6a0f62b15e34ce43ad75bd755cc2ac5074363
4
+ data.tar.gz: 5cd10be0dbc8590dd039d95cbd2e7a1dd3eab3a9
5
5
  SHA512:
6
- metadata.gz: 05ee9ba0fdf109e56602234478aa60295292a3151b908613e82af3fb0f8496e6f7feb8575c03c96d57965648ed7ababad29b3b8ca10a6d2af74426c3ae69054f
7
- data.tar.gz: 12928daddd40d73bd5e909d4465eb10287632d20369173166c81560b4a4e0f40e5401b2a4d62c1b1a7f08567b4d105078ec96ac076302e2d450dc00f83b710cc
6
+ metadata.gz: c7a6aa8263c90cbfd7ab1ee641cec7012c807f588a41f4072e188d80e52f44b7876a5ccfe899156026df68e2956c50733071daa2d9d945a4dbb2e1486660c7fe
7
+ data.tar.gz: 84fe86a884806e674a98149f99d09c90616f06e4427d34c854c9381be33fae22e3c8f4506abef9b1c917b534fdf11e5b1d2879a9d5bcd88a3c570373fed159a9
@@ -72,7 +72,7 @@ class Cambium::AdminController < Cambium::BaseController
72
72
 
73
73
  def create_params
74
74
  params
75
- .require(admin_model.to_s.humanize.downcase.to_sym)
75
+ .require(admin_model.to_s.tableize.singularize.to_sym)
76
76
  .permit(admin_form.fields.to_h.keys)
77
77
  end
78
78
 
@@ -105,13 +105,15 @@ module Cambium
105
105
  end
106
106
  end
107
107
 
108
- def cambium_form(obj, fields)
108
+ def cambium_form(obj, fields, url=nil)
109
109
  content_tag(:section, :class => 'form') do
110
- case action_name
111
- when 'edit', 'update'
112
- url = cambium_route(:show, obj)
113
- else
114
- url = cambium_route(:index, obj)
110
+ if url.nil?
111
+ case action_name
112
+ when 'edit', 'update'
113
+ url = cambium_route(:show, obj)
114
+ else
115
+ url = cambium_route(:index, obj)
116
+ end
115
117
  end
116
118
  simple_form_for obj, :url => url do |f|
117
119
  cambium_form_fields(f, obj, fields)
@@ -1,3 +1,3 @@
1
1
  module Cambium
2
- VERSION = "1.1.4"
2
+ VERSION = "1.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cambium
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean C Davis