-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Record creation fails #14
Comments
I made a very simple test table, which has only three columns: Name column (integer), one text and one float number column. @record = Airtable::Record.new() creates an empty row. p @record @record[:laji] = "test text" @tblTest.update(@record) If I'm trying to do this incorrectly, please forgive me: I am new to Ruby. At least you should consider updating README.md and give some more precise examples on record creation, update etc. |
You may want to check capitalization of the keys to column names. I had that issue as well, and since the gem doesn't raise an error for an API call failure you won't get any ruby errors.
should be
with the default I've been meaning to do some work to raise some errors in the gem, which should help developers understand why a request is not behaving as expected. |
Yes, after some trials I found out that this works: I didn't find out before that capitalization is important, because when I print out the records with "p" (for example), the attributes are not capitalized in the output, even if my table columns are! Ruby can be a bit confusing in the beginning... |
@Etsija in most cases it's stylistic, but the "hashrocket" style ( here's a nice short blog post I just found with a little more info - http://alwayscoding.ca/momentos/2012/06/15/ruby-hash-syntax-hashrocket-vs-json-style/ |
Well this is weird: my "name" column is "Nro". In record creation, the column needs to be case sensitive. But when I write this: (And, obviously I don't know how to cut the code in lines...) |
There's some magic from HashWithIndifferentAccess or from converting field Alex On Friday, October 21, 2016, Jyrki Keisala [email protected] wrote:
Sent from Gmail Mobile on my iPhone |
I had a similar issue where the default Name column expected the key to be The client just returns false for the failed API call, rather than raising On Thursday, October 20, 2016, Jyrki Keisala [email protected]
vcardme.com/sam |
Just ran into the same issue (record not being created, method returning
Hope this saves someone else some time, if they also run into it. |
I am currently able to create an empty record (which is seen in Airtable by a new empty row) with
@record = Airtable::Record.new()
@table.create(@record)
but whenever I try to create a record with some predefined keys as in your example
@record = Airtable::Record.new(:name => "Sarah Jaine", :email => "[email protected]")
@table.create(@record)
(Of course I am using my own column names...)
nothing at all gets created. Documentation is very minimalistic, so: does the record need to include all the keys? Any idea why my record creation with any real values fails?
I get no Ruby errors, but nothing gets created.
The text was updated successfully, but these errors were encountered: