Person.confirmed? isn't private, some schedule fixes
This commit is contained in:
parent
b2f8cfbec3
commit
c2e007e2b8
2 changed files with 16 additions and 16 deletions
|
|
@ -58,6 +58,19 @@ class Person < ActiveRecord::Base
|
||||||
Person.where(:user_id => user_id).first
|
Person.where(:user_id => user_id).first
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def confirmed?
|
||||||
|
if User.exists?(self.user_id)
|
||||||
|
user = User.find(self.user_id)
|
||||||
|
if user.confirmed?
|
||||||
|
true
|
||||||
|
else
|
||||||
|
false
|
||||||
|
end
|
||||||
|
else
|
||||||
|
false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def biography_limit
|
def biography_limit
|
||||||
if !self.biography.nil? && self.biography.split.size > 150
|
if !self.biography.nil? && self.biography.split.size > 150
|
||||||
|
|
@ -79,17 +92,4 @@ class Person < ActiveRecord::Base
|
||||||
self.guid = guid
|
self.guid = guid
|
||||||
end
|
end
|
||||||
|
|
||||||
def confirmed?
|
|
||||||
if User.exists?(self.user_id)
|
|
||||||
user = User.find(self.user_id)
|
|
||||||
if user.confirmed?
|
|
||||||
true
|
|
||||||
else
|
|
||||||
false
|
|
||||||
end
|
|
||||||
else
|
|
||||||
false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
<% while conf_start < conf_end %>
|
<% while conf_start < conf_end %>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:10%">
|
<td style="width:5%">
|
||||||
<%= conf_start.strftime("%H:%M") %>
|
<%= conf_start.strftime("%H:%M") %>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
@ -39,14 +39,14 @@
|
||||||
<% if !event.empty? %>
|
<% if !event.empty? %>
|
||||||
<!-- There is an event, calculate the span and show it -->
|
<!-- There is an event, calculate the span and show it -->
|
||||||
<% span[room.id] = event[0].event_type.length / 15 %>
|
<% span[room.id] = event[0].event_type.length / 15 %>
|
||||||
<td style="width:45%" rowspan ="<%= span[room.id] %>">
|
<td rowspan ="<%= span[room.id] %>">
|
||||||
<%= event[0].title %><br>
|
<%= event[0].title %><br>
|
||||||
</td>
|
</td>
|
||||||
<% span[room.id] = span[room.id] + 1 %>
|
<% span[room.id] = span[room.id] + 1 %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if span[room.id] == 1 %>
|
<% if span[room.id] == 1 %>
|
||||||
<!-- span equals 1 show an empty td -->
|
<!-- span equals 1 show an empty td -->
|
||||||
<td style="width:45%"class="empty <%= "room" + "#{room.id}" %>">
|
<td class="empty <%= "room" + "#{room.id}" %>">
|
||||||
Empty
|
Empty
|
||||||
</td>
|
</td>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue