Created
December 21, 2013 17:10
-
-
Save josephdburdick/8072172 to your computer and use it in GitHub Desktop.
NameError in SessionsController#create
uninitialized constant Admin::AdminsEvent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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