sirupsen / airrecord

Ruby wrapper for Airtable, your personal database

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't query anything

nekapoor opened this issue · comments

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.

Can you show your full snippet of code please?

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!

Can you post the full backtrace please?

So I ran the rails console and I tried

AirtableTutorApplication.all

and I get this error:

NoMethodError: undefined method `api_key=' for Airrecord:Module