Skip to content

Instantly share code, notes, and snippets.

@josephdburdick
Created December 21, 2013 17:10
Show Gist options
  • Save josephdburdick/8072172 to your computer and use it in GitHub Desktop.
Save josephdburdick/8072172 to your computer and use it in GitHub Desktop.
NameError in SessionsController#create uninitialized constant Admin::AdminsEvent
def store_admin_names admins
admin_names = []
admins.each do |admin|
admin_names << admin["name"]
new_admin = Admin.find_or_initialize_by(fb_id: admin["id"])
new_admin.name = admin["name"]
new_admin.save!
#new_admin.events << Event.last["id"] #this is the line giving me problems
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment