Skip to content

Commit 85811fb

Browse files
committed
warning for non-logged in users
1 parent 006580b commit 85811fb

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

app/views/entries/new.html.erb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
<!--suppress CheckTagEmptyBody -->
2+
<% unless user_signed_in? %>
3+
<p class="text-gray small p-0 m-0" style="">
4+
To qualify for the competition, make sure to
5+
<%= link_to "login", new_session_path(resource_name), class: "text-yellow" %>
6+
into your account.
7+
</p>
8+
<% end %>
9+
210
<br>
311
<div class="card p-3 border-0 shadow-sm">
412
<%= form_for @entry do |f| %>
@@ -142,8 +150,8 @@
142150
</small>
143151
<small class="text-secondary">
144152
Not a member yet?
145-
<%= link_to 'Join Now', new_registration_path(resource_name), class: 'text-decoration-none text-primary' %>
146-
or <%= link_to 'Sign In', new_session_path(resource_name) %>
153+
<%= link_to 'Create Account', new_registration_path(resource_name), class: 'text-decoration-none text-primary' %>
154+
or <%= link_to 'Log In', new_session_path(resource_name) %>
147155
</small>
148156
<% else %>
149157
<div class="col">

usefull.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ select *
132132
from entries
133133
where user_id = '187' and created_at between 'April 10, 2021 15:00' and 'April 11, 2021 22:00';
134134

135+
select *
136+
from users
137+
order by competition desc;
138+
135139
----------------------------------------------------------------------------
136140
$ rake db:rollback STEP=1
137141

0 commit comments

Comments
 (0)