Skip to content

Commit d533abd

Browse files
committed
Bugfix : typo in bookings templates displaying errors when generated admin was displayed
1 parent af47e5d commit d533abd

File tree

5 files changed

+487
-6
lines changed

5 files changed

+487
-6
lines changed

app/controllers/users_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ def check
9595
logger.debug 'Sent username: '+params.inspect
9696
@user = User.where('username = ?', params['username']).first;
9797
logger.debug 'Retreived user: '
98-
logger.debug @user
98+
logger.debug @user.inspect
9999
if( nil != @user && @user.password == params['password']) then
100-
render :json => @user
100+
render :json => @user.to_json(:except => ['password'])
101101
else
102-
render :json => @user, :status => :forbidden
102+
render :json => @user.to_json(:except => ['password']), :status => :forbidden
103103
end
104104
end
105105

app/views/bookings/_form.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
<%= f.text_field :creditCardNumber %>
3333
</div>
3434
<div class="field">
35-
<%= f.label :crediCardType %><br />
36-
<%= f.text_field :crediCardType %>
35+
<%= f.label :creditCardType %><br />
36+
<%= f.text_field :creditCardType %>
3737
</div>
3838
<div class="field">
3939
<%= f.label :creditCardName %><br />

app/views/bookings/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<td><%= booking.checkinDate %></td>
2626
<td><%= booking.checkoutDate %></td>
2727
<td><%= booking.creditCardNumber %></td>
28-
<td><%= booking.crediCardType %></td>
28+
<td><%= booking.creditCardType %></td>
2929
<td><%= booking.creditCardName %></td>
3030
<td><%= booking.creditCardExpiryMonth %></td>
3131
<td><%= booking.creditCardExpiryYear %></td>

db/development.sqlite3

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)