Can't query anything
nekapoor opened this issue · comments
Neeraj Kapoor commented
Hey! I followed the instructions listed (i tried both the adhoc querying instructions and the individual "model" class instructions you listed) and just tried a simple ".all" query and I get "ArgumentError: wrong number of arguments (2 for 0)" as an error.
I'm not really sure what's going on. Any thoughts? Thanks so much.
Simon Eskildsen commented
Can you show your full snippet of code please?
Neeraj Kapoor commented
Airrecord.api_key = Rails.application.secrets.airtable["api_key"]
class AirtableTutorApplication < Airrecord::Table
self.base_key = Rails.application.secrets.airtable["tutor_app_key"]
self.table_name = "Application"
def self.unprocessed_applications
all(filter: '{admission_notification_sent_on} == ""')
end
end
Then, if I try
AirtableTutorApplication.all
I get the error. Thanks!
Simon Eskildsen commented
Can you post the full backtrace please?
Neeraj Kapoor commented
So I ran the rails console and I tried
AirtableTutorApplication.all
and I get this error:
NoMethodError: undefined method `api_key=' for Airrecord:Module