nyros_form2 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/nyros_form2/users_controller.rb +9 -7
- data/app/views/nyros_form2/users/index.html.erb +31 -3
- data/app/views/nyros_form2/users/new.html.erb +1 -1
- data/config/routes.rb +1 -6
- data/lib/nyros_form2/version.rb +1 -1
- metadata +1 -2
- data/config/initializers/exception_handler.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5e5f33967f2c30aaf8cb0de1c1c9320164162d8d8dc0c617a9594fe1bf57541
|
4
|
+
data.tar.gz: 6aca48e5a822542558b49e20aeee8b12c082abdcb768c9a982b52455dc156137
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ef261960733eb4834dd05b47ed68ad0227516c46fc08cb30aacd9cea328f806b9867699b8f34d5c54b3cd134a9f3de4d0272ab05208211d69b9f8a1636321c3
|
7
|
+
data.tar.gz: a3511cb274764ed6fa1503323b224b133b245fc50ab818ab6922cc0b4c8d567772614379af84080d6a65d2911a71ac62fb6741d93653091c1e1e8aa06a913ee2
|
@@ -11,17 +11,19 @@ module NyrosForm2
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def create
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
14
|
+
@user = User.new(user_params)
|
15
|
+
if @user.save
|
16
|
+
|
17
|
+
redirect_to users_path
|
18
|
+
|
19
|
+
else
|
20
|
+
render user_new_path
|
21
|
+
end
|
20
22
|
end
|
21
23
|
|
22
24
|
|
23
25
|
def show
|
24
|
-
|
26
|
+
@user = User.find(params[:id])
|
25
27
|
end
|
26
28
|
|
27
29
|
def edit
|
@@ -1,4 +1,32 @@
|
|
1
|
-
<
|
2
|
-
<
|
1
|
+
<br><br>
|
2
|
+
<div class="container">
|
3
|
+
<div>
|
4
|
+
<h2>Users</h2>
|
5
|
+
<%= link_to "New_user", new_user_path %>
|
6
|
+
</div>
|
7
|
+
<table class="table">
|
8
|
+
<thead>
|
9
|
+
<tr>
|
10
|
+
<th>Id</th>
|
11
|
+
<th>name</th>
|
12
|
+
<th>email</th>
|
13
|
+
<th>mobile</th>
|
14
|
+
</tr>
|
15
|
+
</thead>
|
16
|
+
<tbody>
|
17
|
+
<% @users.each do |u| %>
|
18
|
+
<tr>
|
19
|
+
<td><%= u.id %> </td>
|
20
|
+
<td><%= u.name %></td>
|
21
|
+
<td><%= u.mobile %></td>
|
22
|
+
<td><%= u.email %></td>
|
23
|
+
</tr>
|
24
|
+
<% end %>
|
25
|
+
</tbody>
|
26
|
+
</table>
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
</div>
|
31
|
+
|
3
32
|
|
4
|
-
<%= link_to "New", users_new_path %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<div class="form-horizontal no-border form u-dimension-2"
|
4
4
|
style ="margin-top: 20px; width: 450px;"align="center" >
|
5
5
|
|
6
|
-
<%= form_for
|
6
|
+
<%= form_for @user, url: {action: :create} do |f| %>
|
7
7
|
<h2 align="center">Sign in </h2>
|
8
8
|
<% flash.each do |name, msg| %>
|
9
9
|
<%= content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String) %>
|
data/config/routes.rb
CHANGED
data/lib/nyros_form2/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nyros_form2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- raju rekadi
|
@@ -74,7 +74,6 @@ files:
|
|
74
74
|
- app/views/nyros_form2/users/new.html.erb
|
75
75
|
- app/views/nyros_form2/users/show.html.erb
|
76
76
|
- app/views/nyros_form2/users/update.html.erb
|
77
|
-
- config/initializers/exception_handler.rb
|
78
77
|
- config/routes.rb
|
79
78
|
- db/migrate/20191014060751_create_nyros_form2_failures.rb
|
80
79
|
- db/migrate/20191014071953_create_nyros_form2_users.rb
|