user_mgmt 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,10 +14,10 @@ module UserMgmt
14
14
  response = sign_up *params[:user].values
15
15
 
16
16
  if response[:status] == "200"
17
- flash[:notice] = "User was created succesfully!"
17
+ flash[:success] = response[:body]
18
18
  redirect_to main_app.root_path
19
19
  else
20
- flash[:warning] = response[:body]#"User couldn't be created. Try again."
20
+ flash[:warning] = response[:body]
21
21
  redirect_to sign_up_path
22
22
  end
23
23
 
@@ -1,14 +1,17 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
- <title>UserMgmt</title>
5
- <%= stylesheet_link_tag "user_mgmt/application", media: "all" %>
6
- <%= javascript_include_tag "user_mgmt/application" %>
7
- <%= csrf_meta_tags %>
4
+ <title>UserMgmt</title>
5
+ <%= stylesheet_link_tag "user_mgmt/application", media: "all" %>
6
+ <%= javascript_include_tag "user_mgmt/application" %>
7
+ <%= csrf_meta_tags %>
8
8
  </head>
9
9
  <body>
10
-
11
- <%= yield %>
12
-
10
+ <div class="container">
11
+ <% flash.each do |key, value| %>
12
+ <%= content_tag(:div, value, class: "alert alert-#{key} ") %>
13
+ <% end %>
14
+ <%= yield %>
15
+ </div>
13
16
  </body>
14
17
  </html>
@@ -1,3 +1,3 @@
1
1
  module UserMgmt
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: user_mgmt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: