Skip to content
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

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

Open
vinodkahuja opened this issue Jun 21, 2018 · 0 comments
Open

Comments

@vinodkahuja
Copy link

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.

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

No branches or pull requests

2 participants