Class: Store::RetrievalsController

Inherits:
StoreController
  • Object
show all
Defined in:
app/controllers/store/retrievals_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'app/controllers/store/retrievals_controller.rb', line 6

def create
  @person = @store_organization.people.where(:email => params[:email]).first

  return fail if @person.nil?

  @passes = Pass.where(:organization_id => @store_organization.id)
                  .where(:person_id => @person.id)
                  .not_expired
                  .all
  
  return fail if @passes.empty?

  @person.delay.send_pass_summary_email(@passes)

  flash[:notice] = "Your reminder has been sent"
  render "index"
end

#indexObject



2
3
4
# File 'app/controllers/store/retrievals_controller.rb', line 2

def index

end