attended field as true in new registrations created by admin
This commit is contained in:
parent
949cbd6a6c
commit
5437cd5226
2 changed files with 4 additions and 4 deletions
|
|
@ -44,7 +44,7 @@ class Admin::UsersController < ApplicationController
|
||||||
person.update_attributes(params[:user][:people])
|
person.update_attributes(params[:user][:people])
|
||||||
begin
|
begin
|
||||||
params[:user][:conferences].each do |r|
|
params[:user][:conferences].each do |r|
|
||||||
registration = person.registrations.new(:conference_id => r)
|
registration = person.registrations.new(:conference_id => r, :attended => 't')
|
||||||
registration.save!
|
registration.save!
|
||||||
end
|
end
|
||||||
redirect_to admin_conference_registrations_path(@conference.short_title)
|
redirect_to admin_conference_registrations_path(@conference.short_title)
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ class Registration < ActiveRecord::Base
|
||||||
attr_accessible :person_id, :conference_id, :attending_social_events, :attending_with_partner,
|
attr_accessible :person_id, :conference_id, :attending_social_events, :attending_with_partner,
|
||||||
:using_affiliated_lodging, :arrival, :departure, :person_attributes, :other_dietary_choice, :dietary_choice_id,
|
:using_affiliated_lodging, :arrival, :departure, :person_attributes, :other_dietary_choice, :dietary_choice_id,
|
||||||
:handicapped_access_required, :supporter_registration_attributes, :social_event_ids, :other_special_needs,
|
:handicapped_access_required, :supporter_registration_attributes, :social_event_ids, :other_special_needs,
|
||||||
:event_ids
|
:event_ids, :attended
|
||||||
|
|
||||||
accepts_nested_attributes_for :person
|
accepts_nested_attributes_for :person
|
||||||
accepts_nested_attributes_for :supporter_registration
|
accepts_nested_attributes_for :supporter_registration
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue