Moved withdrawn_event check to helper
Signed-off-by: Carlos Coelho <carlos@pencillabs.com>
This commit is contained in:
parent
e268acec23
commit
6beb9f68ab
3 changed files with 13 additions and 5 deletions
11
app/helpers/admin/conference_helper.rb
Normal file
11
app/helpers/admin/conference_helper.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
module Admin
|
||||
module ConferenceHelper
|
||||
def withdrawn_events?(conference)
|
||||
conference.program.events.where(state: :withdrawn).empty?
|
||||
end
|
||||
|
||||
def withdrawn_events_count(conference)
|
||||
conference.program.events.where(state: :withdrawn).count
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue