ums 0.1.1 → 0.1.2

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: 8d9ada20fb4e90a24b5768a8be07a6a34d28ac5f
4
- data.tar.gz: 9370cf0cbb9766db9067553e7de63a6f14c7567b
3
+ metadata.gz: 5101be15cbdf7965aaee189cb36a08c9562daec7
4
+ data.tar.gz: e8a1c75f9569e1a5eb75c6f912995b40199decde
5
5
  SHA512:
6
- metadata.gz: 1f3b68ca93f4ced6980cd52f00650d7c7e59471ca1192fade522ecc4fd9c9dd301667a33df5164709be1173861cca84b4a6533bf551c447984b8a1abd258bdd8
7
- data.tar.gz: 53655b3ddc211f3e326f84a6ca3794b84ee850690d8ed0735ce08eabf0ddbac364d537ae6997f3cd19723574521c0ce66fadef3c320b61abf5d88d6cc5a8c4ff
6
+ metadata.gz: 7a17f81f6c8d738582086e90a32b2beaa83e9eab64b762a0fcc7f513a945d123b6fe59b475baa28bf7e04cb8e3513128267eedfbe0fe560cf87b3eacb9fa33b0
7
+ data.tar.gz: c023ec6279fc0492952656e8dc1075455daf956152c4372436b6ce2295261a407890aa5aeee510fcd01a37e7f120bc8a2395b9e0c4997468572b5b9050033ee8
@@ -50,7 +50,7 @@ class Ums::UsersController < ApplicationController
50
50
  session[:user_permission] = user_permission
51
51
 
52
52
  respond_to do |format|
53
- format.html { redirect_to uri || main_index_path }
53
+ format.html { redirect_to uri || root_path }
54
54
  format.json { render json: {is_success:"true",message:"登录成功",user:user} }
55
55
  end
56
56
 
@@ -74,7 +74,7 @@ class Ums::UsersController < ApplicationController
74
74
  session[:last_login_ip] = nil
75
75
  session[:login_count] = nil
76
76
  #flash[:notice] = "已退出"
77
- redirect_to '/' #main_index_path
77
+ redirect_to '/'
78
78
  end
79
79
 
80
80
  def password
@@ -2,4 +2,5 @@ class Ums::Function < ActiveRecord::Base
2
2
  has_and_belongs_to_many :roles
3
3
  validates_presence_of :name
4
4
  validates_presence_of :controller
5
+ validates_uniqueness_of :name
5
6
  end
@@ -1,4 +1,5 @@
1
1
  class Ums::Role < ActiveRecord::Base
2
2
  has_and_belongs_to_many :functions
3
3
  validates_presence_of :name
4
+ validates_uniqueness_of :name
4
5
  end
@@ -24,7 +24,7 @@
24
24
  <%= f.text_field :action %>
25
25
  </div>
26
26
  <div class="actions">
27
- <%= f.submit ' 保存 ',:class => 'btn btn-primary'%>
27
+ <%= f.submit ' 保存 ',:class => 'btn btn-primary', data: { disable_with: '正在保存...' } %>
28
28
  &nbsp;&nbsp;
29
29
  <%= link_to ' 返回 ', ums.functions_path,:class => "btn btn-default" %>
30
30
  </div>
@@ -25,7 +25,7 @@
25
25
  <% end %>
26
26
  </div>
27
27
  <div class="actions">
28
- <%= f.submit ' 保存 ',:class => 'btn btn-primary'%>
28
+ <%= f.submit ' 保存 ',:class => 'btn btn-primary',data: { disable_with: '正在保存...' }%>
29
29
  &nbsp;&nbsp;
30
30
  <%= link_to ' 返回 ', ums.roles_path,:class => "btn btn-default" %>
31
31
  </div>
@@ -36,7 +36,7 @@
36
36
  <%= f.check_box :is_enabled %>
37
37
  </div>
38
38
  <div class="actions">
39
- <%= f.submit ' 保存 ',:class => 'btn btn-primary'%>
39
+ <%= f.submit ' 保存 ',:class => 'btn btn-primary',data: { disable_with: '正在保存...' }%>
40
40
  &nbsp;&nbsp;
41
41
  <%= link_to ' 返回 ', ums.users_path,:class => "btn btn-default" %>
42
42
  </div>
data/lib/ums/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ums
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ums
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - wangfuhai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-07 00:00:00.000000000 Z
11
+ date: 2014-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails