Export only this year's talk preferences
This commit is contained in:
parent
9cbb51456c
commit
5e83ea8b3c
|
@ -9,8 +9,7 @@ class HomeController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def export
|
def export
|
||||||
@talks = Talk.find(:all, from: :halfnarp_friendly)
|
@talk_preferences = TalkPreference.this_years
|
||||||
@talk_preferences = TalkPreference.all
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def conflicts
|
def conflicts
|
||||||
|
|
|
@ -13,6 +13,11 @@ class TalkPreference < ActiveRecord::Base
|
||||||
ids.all? { |id| include? id }
|
ids.all? { |id| include? id }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.this_years
|
||||||
|
timespan = Time.now.change(month: 1, day: 1, hour: 0)..Time.now.change(month: 12, day: 1, hour: 0)
|
||||||
|
where created_at: timespan
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def assign_new_unique_id
|
def assign_new_unique_id
|
||||||
|
|
Loading…
Reference in New Issue