config_manager 0.0.6 → 0.0.7

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: c35668b6fd2b9dc71f88b90d151fa225db6c0198
4
- data.tar.gz: 0e9240aa867e67b482f40fd022ce9e0d34a2cbaf
3
+ metadata.gz: 584c51549d9afcaa39ac4ca191ad1bbc2236072f
4
+ data.tar.gz: 11dbd19f7382ffe06a80f7f21461a87de1b2f592
5
5
  SHA512:
6
- metadata.gz: c903e028f3d5b543aae703e8f9ae357590d480f32cb30e085f1af26259efd771cfaad6ba58992689f88ce82a1a90311e103fd1ebf08edeaefbea3cb579c7b40a
7
- data.tar.gz: 76371a4819e9b6aa0379787642eed388ca109f60ef1a18e5eedb5b4490ee19fe5675fa254701255f295a57cac801eeed38bcc94fac4a3a4af3019806ccb14b33
6
+ metadata.gz: 57ec6eb759fe54df89795ef594927dd0934c337f16517f548637cfcd685881ff51cf63d2d6d4f0116066dff5fa6408363f2859f67f415f1958ab75c2b6455b63
7
+ data.tar.gz: d232150ae8a1244d24a19082a2dcda9153ae2481b4bba72b991dc984302647f42fb1646f6a95d8e03fdd376c8465397cefd9f94f7e2a410bf929245051262f50
@@ -20,6 +20,19 @@ module ConfigManager
20
20
  redirect_to admins_path
21
21
  end
22
22
 
23
+ # POST /admin/:id/update
24
+ def update
25
+ @admin = Admin.find(params[:id])
26
+ if @admin.update_attributes admin_params
27
+ flash[:notice] = "Admin user #{@admin.email} successfully updated"
28
+ else
29
+ render "edit"
30
+ end
31
+ rescue ActiveRecord::RecordNotFound
32
+ flash[:error] = "Admin with id=#{params[:id]} couldn't be found"
33
+ redirect_to admins_path
34
+ end
35
+
23
36
  # POST /admins
24
37
  def create
25
38
  @admin = Admin.new admin_params
@@ -27,14 +27,15 @@ section.clearfix
27
27
  div.col-sm-4
28
28
  h3 Create/Edit Toggle
29
29
  = render 'form'
30
- h3 Load From YAML
31
- p.text-muted
32
- small Load toggles from config/config_manager_toggles.yml
33
- div.text-center
34
- = link_to "Load",
35
- load_default_toggles_path,
36
- :method => :post,
37
- :class => 'btn-block btn btn-warning'
30
+ - unless Rails.env.production?
31
+ h3 Load From YAML
32
+ p.text-muted
33
+ small Load toggles from config/config_manager_toggles.yml
34
+ div.text-center
35
+ = link_to "Load",
36
+ load_default_toggles_path,
37
+ :method => :post,
38
+ :class => 'btn-block btn btn-warning'
38
39
  h3 Dump To YAML
39
40
  p.text-muted
40
41
  small Dump toggles to config/config_manager_toggles.yml
@@ -1,3 +1,3 @@
1
1
  module ConfigManager
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: config_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pablo Calderon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-05 00:00:00.000000000 Z
11
+ date: 2014-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails