Skip to content

Unable to add data to jfeilds in users table through user object #81

Description

@vinodkahuja

I am trying to post JSON object in the user table but unable to post it. I can successfully add the JSON object manually in the in the database using insert SQL command in psql. But when I do it through ruby I get no error but the field is not updated.

Here is the code I wrote in the app.rb file.

------------ create user account ------------

get "/account_creation" do
slim :account_creation
end

post "/account_creation" do
opts = {
balance: 200,
name: params["username"],
email: params["useremail"],
password: SecureRandom.hex(2),
jfields: '{"skill": "Java"}'
}
FB.create(:user, opts ).user
end

With this code balance, name, email and password field gets updated but jfields is not updating.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions