alexterziev

Activity Graph

Page 1 of 1

2019-01-14

[09:48:13] alexterziev: has joined #ruby
[09:48:27] alexterziev: has joined #RubyOnRails
[09:50:46] alexterziev: Hi, I have issue with getting activerecords for one of my tables (Account). If I try to run `Account.first`, I get an error (`(byebug) Account.first *** TypeError Exception: wrong argument type Hash (expected String)`)
[09:53:21] alexterziev: Here is the account model: http://paste.ubuntu.com/p/Bfv3Ckv5Rq/
[09:58:38] alexterziev: tbuehlmann: ok, just a min
[10:01:54] alexterziev: tbuehlmann: https://pastebin.com/CFqNnhq2
[10:06:59] alexterziev: tbuehlmann: `gon.accounts = current_user.accounts.inject({}) do |memo, account|`
[10:15:23] alexterziev: tbuehlmann: ok, I will try to debug on all places where I use BigDecimal to see if that is an issue, thanks for the hint
[10:20:07] alexterziev: Ping timeout: 256 seconds

2019-01-12

[16:55:17] alexterziev: Ping timeout: 256 seconds

2019-01-11

[13:39:19] alexterziev: has joined #ruby
[13:39:29] alexterziev: has joined #RubyOnRails
[13:41:56] alexterziev: Hi, after updating rails from version 4.2 to 5.2, I get error in registering new users. The error comes from Member model when it executes 'create' function. Here is the full error stack trace: https://pastebin.com/xabxUUkL
[13:43:57] alexterziev: tbuehlmann: 30 if @member.disabled == 1
[13:46:02] alexterziev: tbuehlmann: Arkentias Here is the line where I declare member `27 @member = Member.from_auth(auth_hash)`
[13:50:08] alexterziev: Arkentias: tbuehlmann I did that already. The from_auth function looks like this in Member model: https://pastebin.com/N10zH68L
[13:51:06] alexterziev: Also forgot to mention that the same code is working on Rails 4.2. The error occured after updating to Rails 5.2.
[13:53:02] alexterziev: the error is thrown from create_from_auth function
[13:53:17] alexterziev: this line : `member = create(email: auth_hash['info']['email'], nickname: auth_hash['info']['nickname'], activated: false)`
[13:54:07] alexterziev: if I try to save new member using rails console, I get the same error message: wrong number of arguments (given 1, expected 0)
[13:58:16] alexterziev: Arkentias: here is the member.rb file: http://paste.ubuntu.com/p/VWJyD755Kr/
[14:05:06] alexterziev: Arkentias: I have the same concern about using a reserved name
[14:05:16] alexterziev: any idea how to debug this
[14:08:09] alexterziev: Arkentias: ok I will try that, thanks