nyros_form2 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
  SHA256:
3
- metadata.gz: 060c3aeb4ccfdd89b807f3ef885c552ef73c01ff18e133667aa9caee079b6b59
4
- data.tar.gz: 9fab4ef7b1c958e651b20c5b75e237b8ed4db340e54197a47d5219e63cefbb59
3
+ metadata.gz: 119c76f8e5f23ff50c387f1ce8b124287597eb9ebc814ab6b862981330b506e1
4
+ data.tar.gz: 7278a7ce8d1b6eecd0d894747f1ca841e4d987ae98f5ea7a1de9fe41fdc8354d
5
5
  SHA512:
6
- metadata.gz: b264468c1eebe9acea75494c4697dfbb25e0e0d780a25ce01c13ba24414bb0ccad0c4a946cf8a03f94be950c80519a31276fe407ec86c115ce865ae15bd4d155
7
- data.tar.gz: aa5419e31ed027cf23b79a70e52b85b091a24a593992beb66cfc9f557c88537c3d5e0adbcf94cd2ec2babf66d3edb55ac07ba857ddadc24fe7a71212b8c034ce
6
+ metadata.gz: fad28acaaecfa5bc837fe90301f78f57bca10be6d0eaf3a4db8eb687f5b6e96b644747916a331f6b4443edc68ab7af5b7229c7e2828ad3479748d21fee0857b9
7
+ data.tar.gz: a14cde61b424bc4760d8f17bb37976779a091ae9ee4a14393018cef266d8dde387db383c3a43fafe40e68bbbac2162e16f0c100e3e34434bb374a9b1360ae3fa
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,40 @@
1
+ require_dependency "nyros_form2/application_controller"
2
+
3
+ module NyrosForm2
4
+ class UsersController < ApplicationController
5
+ def index
6
+ @users = User.all
7
+ end
8
+
9
+ def new
10
+ @user = User.new
11
+ end
12
+
13
+ def create
14
+ @user = User.new(user_params)
15
+ if @user.save
16
+ render users_path
17
+ else
18
+ render json: @user_requirement.errors, status: :unprocessable_entity
19
+ end
20
+ end
21
+
22
+
23
+ def show
24
+ @user = User.find(params[:id])
25
+ end
26
+
27
+ def edit
28
+ end
29
+
30
+ def update
31
+ end
32
+
33
+ def delete
34
+ end
35
+
36
+ def user_params
37
+ params.require(:user).permit(:name, :email, :mobile);
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,4 @@
1
+ module NyrosForm2
2
+ module UsersHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module NyrosForm2
2
+ class User < ApplicationRecord
3
+ end
4
+ end
@@ -7,6 +7,7 @@
7
7
 
8
8
  <%= stylesheet_link_tag "nyros_form2/application", media: "all" %>
9
9
  <%= javascript_include_tag "nyros_form2/application" %>
10
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
10
11
  </head>
11
12
  <body>
12
13
 
@@ -1,4 +1,4 @@
1
- <h1>Failures#index</h1>
1
+ <h1>User Form</h1>
2
2
  <ul>
3
3
  <% for failure in @failures %>
4
4
  <li><%= failure.message %> </li>
@@ -0,0 +1,2 @@
1
+ <h1>Users#delete</h1>
2
+ <p>Find me in app/views/nyros_form2/users/delete.html.erb</p>
@@ -0,0 +1,2 @@
1
+ <h1>Users#edit</h1>
2
+ <p>Find me in app/views/nyros_form2/users/edit.html.erb</p>
@@ -0,0 +1,4 @@
1
+ <h1>Users#index</h1>
2
+ <p>Find me in app/views/nyros_form2/users/index.html.erb</p>
3
+
4
+ <%= link_to "New", users_new_path %>
@@ -0,0 +1,209 @@
1
+ <body >
2
+ <div class="container" >
3
+ <div class="form-horizontal no-border form u-dimension-2"
4
+ style ="margin-top: 20px; width: 450px;"align="center" >
5
+
6
+ <%= form_for(users_new_path) do |f| %>
7
+ <h2 align="center">Sign in </h2>
8
+ <% flash.each do |name, msg| %>
9
+ <%= content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String) %>
10
+ <% end %>
11
+
12
+ <div class="form-group">
13
+ <div class="col-sm-12">
14
+ <%= f.label :name %>
15
+ <%= f.text_field :name, autofocus: true, autocomplete: "current-name",class: 'form-control', required:
16
+ 'required'%>
17
+ </div>
18
+ </div>
19
+
20
+ <div class="form-group">
21
+ <div class="col-sm-12">
22
+ <%= f.label :email %>
23
+ <%= f.email_field :email, autocomplete: "email",class: 'form-control', required: 'required'%>
24
+ </div>
25
+ </div>
26
+
27
+ <div class="form-group">
28
+ <div class="col-sm-12">
29
+ <%= f.label :mobile %>
30
+ <%= f.text_field :mobile, autocomplete: "current-name",class: 'form-control', required:
31
+ 'required'%>
32
+ </div>
33
+ </div>
34
+
35
+ <div class="form-group">
36
+ <div class="col-sm-12">
37
+ <%= f.submit "Log in", class: 'submitBtn btn btn-block btn-success btn', id: 'modal-submit' %>
38
+ </div>
39
+ </div>
40
+ <% end %>
41
+ </div>
42
+
43
+ </div>
44
+
45
+
46
+ </body>
47
+ <style type="text/css">
48
+ .form-group{
49
+ width:356px;
50
+ }
51
+
52
+ .form{
53
+
54
+
55
+ padding-top: 30px;
56
+ padding-bottom: 50px;
57
+ }
58
+ .col-sm-12{
59
+ padding-left: 0px;
60
+ padding-right: 0px;
61
+ }
62
+
63
+
64
+
65
+ #user_remember_me{
66
+ margin-right:0px;
67
+ }
68
+ .forgot_pwd{
69
+ padding-left: 90px;
70
+ }
71
+
72
+ a:hover{
73
+ text-decoration-line: none;
74
+
75
+ }
76
+
77
+ #flash_alert{
78
+ color: red;
79
+ }
80
+
81
+
82
+ #form_email{
83
+ margin-left: 23px;
84
+ }
85
+
86
+
87
+
88
+ #sign_in_from{
89
+ margin-left: 400px;
90
+ }
91
+
92
+ /*.new_user{
93
+ margin-top: 100px;
94
+ }*/
95
+
96
+ .form1 {
97
+ margin: 0 auto;
98
+ width: 470px;
99
+ background-color: white;
100
+ padding-left: 0px;
101
+ }
102
+
103
+ .form label {
104
+ display: inline-block;
105
+ text-align: right;
106
+ float: left;
107
+
108
+ }
109
+
110
+ .modal_form{
111
+ margin-top: 0px;
112
+ }
113
+
114
+ .homepage_dish{
115
+ height: 100%;
116
+ width: 50%;
117
+ position:fixed;
118
+ }
119
+
120
+ .login{
121
+ padding-right: 20px;
122
+ color:#0066ff;
123
+ font-size: 20.3px;
124
+ line-height: 1.44359;
125
+ border: 0px;
126
+ font-weight:700;
127
+
128
+
129
+ }
130
+
131
+ .login a:hover{
132
+
133
+ }
134
+
135
+ .signup{
136
+ padding-right: 100px;
137
+ color:#0066ff;
138
+
139
+ font-size: 20.3px;
140
+ line-height: 1.44359;
141
+ border: 0px;
142
+ font-weight:700;
143
+
144
+
145
+ }
146
+
147
+ .top-left {
148
+ position: absolute;
149
+ top:450px;
150
+ left:10px;
151
+ color: #f79b9b;
152
+ font-size: 50px;
153
+ font-weight: 900;
154
+
155
+ }
156
+
157
+ .top-left:hover{
158
+ color: #f79b9b;
159
+ }
160
+
161
+ .bottom-right {
162
+
163
+ }
164
+ .bottom_img{
165
+ width: 300px;
166
+ height: 300px;
167
+ }
168
+ .main_header{
169
+ font-weight: 800;
170
+ font-size:40px;
171
+ color: black;
172
+ }
173
+
174
+ a:hover{
175
+ text-decoration-line: none;
176
+
177
+ }
178
+
179
+ .u-dimension-2 {
180
+ box-shadow: 0 0 0 1px rgba(67,41,163,.1), 0 1px 8px 0 rgba(67,41,163,.1);
181
+ }
182
+
183
+ .form {
184
+ margin: 0 auto;
185
+ width: 470px;
186
+ background-color: white;
187
+ padding-left: 0px;
188
+ }
189
+
190
+
191
+ .form input{
192
+ margin-right: 180px;
193
+ }
194
+
195
+ .err {
196
+ color: red;
197
+ font-size: 14px;
198
+ }
199
+
200
+ #flash_alert{
201
+ color: red;
202
+ font-size: 14px;
203
+ }
204
+
205
+
206
+ </style>
207
+
208
+
209
+
@@ -0,0 +1,2 @@
1
+ <h1>Users#show</h1>
2
+ <p>Find me in app/views/nyros_form2/users/show.html.erb</p>
@@ -0,0 +1,2 @@
1
+ <h1>Users#update</h1>
2
+ <p>Find me in app/views/nyros_form2/users/update.html.erb</p>
data/config/routes.rb CHANGED
@@ -1,3 +1,10 @@
1
1
  NyrosForm2::Engine.routes.draw do
2
- root :to => "failures#index"
2
+ get 'users/index'
3
+ get 'users/new'
4
+ get 'users/show'
5
+ get 'users/edit'
6
+ get 'users/update'
7
+ get 'users/delete'
8
+ # root :to => "failures#index"
9
+ root :to => "users#new"
3
10
  end
@@ -0,0 +1,11 @@
1
+ class CreateNyrosForm2Users < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :nyros_form2_users do |t|
4
+ t.string :name
5
+ t.string :email
6
+ t.bigint :mobile
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module NyrosForm2
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: nyros_form2
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
  - raju rekadi
@@ -51,21 +51,33 @@ files:
51
51
  - app/assets/config/nyros_form2_manifest.js
52
52
  - app/assets/javascripts/nyros_form2/application.js
53
53
  - app/assets/javascripts/nyros_form2/failures.js
54
+ - app/assets/javascripts/nyros_form2/users.js
54
55
  - app/assets/stylesheets/nyros_form2/application.css
55
56
  - app/assets/stylesheets/nyros_form2/failures.css
57
+ - app/assets/stylesheets/nyros_form2/users.css
56
58
  - app/controllers/nyros_form2/application_controller.rb
57
59
  - app/controllers/nyros_form2/failures_controller.rb
60
+ - app/controllers/nyros_form2/users_controller.rb
58
61
  - app/helpers/nyros_form2/application_helper.rb
59
62
  - app/helpers/nyros_form2/failures_helper.rb
63
+ - app/helpers/nyros_form2/users_helper.rb
60
64
  - app/jobs/nyros_form2/application_job.rb
61
65
  - app/mailers/nyros_form2/application_mailer.rb
62
66
  - app/models/nyros_form2/application_record.rb
63
67
  - app/models/nyros_form2/failure.rb
68
+ - app/models/nyros_form2/user.rb
64
69
  - app/views/layouts/nyros_form2/application.html.erb
65
70
  - app/views/nyros_form2/failures/index.html.erb
71
+ - app/views/nyros_form2/users/delete.html.erb
72
+ - app/views/nyros_form2/users/edit.html.erb
73
+ - app/views/nyros_form2/users/index.html.erb
74
+ - app/views/nyros_form2/users/new.html.erb
75
+ - app/views/nyros_form2/users/show.html.erb
76
+ - app/views/nyros_form2/users/update.html.erb
66
77
  - config/initializers/exception_handler.rb
67
78
  - config/routes.rb
68
79
  - db/migrate/20191014060751_create_nyros_form2_failures.rb
80
+ - db/migrate/20191014071953_create_nyros_form2_users.rb
69
81
  - lib/nyros_form2.rb
70
82
  - lib/nyros_form2/engine.rb
71
83
  - lib/nyros_form2/version.rb