faustinoaq changed the topic of #amber to: Welcome to Amber Framework community! | https://amberframework.org | Developer happiness, productivity and bare metal performance | GH: https://github.com/amberframework | Docs: https://docs.amberframework.org | Gitter: https://gitter.im/amberframework/amber | IRC Logger: https://irclog.whitequark.org/amber | Amber::Server.start
<FromGitter> <charleystran> No errors in the DB. I assume it fails to parse. What is the amber way of sending a date (not a datetime) through a form? I can't image I am the first person to try it. I just dont know what format the framework expects dates to be
<FromGitter> <Blacksmoke16> :shrug:
<FromGitter> <charleystran> imagine
<FromGitter> <Blacksmoke16> just parse the string that comes over the wire
<FromGitter> <Blacksmoke16> i dont actually use amber so cant help with testing :/
<FromGitter> <Blacksmoke16> more of the db guy
<FromGitter> <charleystran> isnt this the amber room? Both Rails and Phoenix have standards to send dates from forms. I am just wondering what Amber expects for dates. I can send however is expected, but I cant image every create action should need to manually parse and reformat date objects. Does anyone else have any experience dates in amber?
<FromGitter> <anamba> tbh the rails built-in way isn't good, i usually add Pikaday and parse the date myself anyway.
<FromGitter> <charleystran> Thats for debate, but it at least supports A way. There is no documentation for Amber for how to support the date. Right or Wrong, good or bad.
<FromGitter> <Blacksmoke16> lets figure it out
<FromGitter> <anamba> the amber docs are... not too good. we agree on that. i do not use them, i just refer to specs and source.
<FromGitter> <charleystran> in rails, I can pass a date in the format postgres expects. in amber it doesnt work.
<FromGitter> <charleystran> I am happy to help and jump in but dont know where to start
<FromGitter> <charleystran> which is why I am hoping to see someone who has done a date in the past and improve from there
<FromGitter> <Blacksmoke16> got my amber up and running, now what hehe
<FromGitter> <charleystran> to be basic and raw :) run an amber g scaffold mymodel start_date:date
<FromGitter> <Blacksmoke16> i like how im getting a db connection refused error but i see the query in terminal...
<FromGitter> <charleystran> did you get the db settings all setup in the config/environments/development.cr file
<FromGitter> <Blacksmoke16> typo
<FromGitter> <Blacksmoke16> ill keep you posted, semi afk watching tv too
<FromGitter> <Blacksmoke16> yea tried all combos, nada
<FromGitter> <charleystran> yea, its weird. I assumed someone had needed it or used it before, but I guess not :)
<FromGitter> <Blacksmoke16> yea i figured it out
<FromGitter> <Blacksmoke16> pg doesnt know how to handle `Time` type
<FromGitter> <Blacksmoke16> setting date as string works fine
<FromGitter> <Blacksmoke16> kinda
<FromGitter> <Blacksmoke16> works on write but not on read
<FromGitter> <Blacksmoke16> ill see if i can figure it out
<FromGitter> <charleystran> cool I if you see anything I can help debug let me know. I may end up call it a night soon and will check back in the morning
<FromGitter> <Blacksmoke16> yea maybe file an issue for it
<FromGitter> <Blacksmoke16> prob on the granite lib
<FromGitter> <Blacksmoke16> or see if you can recreate it outside of amber, just using granite with like 1 model and a crystal file
<FromGitter> <Blacksmoke16> @charleystran ^
<FromGitter> <Blacksmoke16> yea, granite model isnt getting initialized
<FromGitter> <Blacksmoke16> `2018-01-01 00:00:00Z`
<FromGitter> <Blacksmoke16> would need to fix parsing out single date vs datetime, as its not matching the regex and gets casts as a string
<FromGitter> <damianham> @charleystran there is a javascript function called toGranite that has been added to the Javascript Date object in src/assets/javascripts/main.js which formats the date according to Granite requirements
<FromGitter> <damianham> @naiyt when I have implemented multi tenancy apps in the past I'm sure I just added a tenant ID field to each table and applied a default scope to all models using the tenant ID for the logged in user, request host domain or URI namespace. It worked fine and was easy to implement.
<FromGitter> <damianham> @drujensen @elorest @eliajpr @faustinoaq PR 118 on amber docs needs merging at some point - recipes are now shard based so the documentation needs updating
<FromGitter> <drujensen> @damianham done. thanks!
snsei has joined #amber
snsei has quit [Ping timeout: 250 seconds]
snsei has joined #amber
snsei has quit [Ping timeout: 250 seconds]
feepbot has quit [Ping timeout: 252 seconds]
feepbot has joined #amber
snsei has joined #amber
snsei has quit [Ping timeout: 276 seconds]
snsei has joined #amber
<FromGitter> <Blacksmoke16> @drujensen how does this make any sense
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5bf6e643a115c91ef7771b8d]
<FromGitter> <Blacksmoke16> before after saving
<FromGitter> <Blacksmoke16> `last_val` is returning wrong value...
snsei has quit [Remote host closed the connection]
snsei has joined #amber
snsei has quit [Remote host closed the connection]
snsei has joined #amber
snsei has quit [Remote host closed the connection]
snsei has joined #amber
snsei has quit [Remote host closed the connection]
snsei has joined #amber
snsei has quit [Remote host closed the connection]
snsei has joined #amber
snsei has quit [Remote host closed the connection]
snsei has joined #amber
snsei has quit [Remote host closed the connection]
snsei has joined #amber
snsei has quit [Remote host closed the connection]
snsei has joined #amber
snsei has quit [Remote host closed the connection]
<FromGitter> <drujensen> hhmm, not sure why. Is another transaction taking place?
snsei has joined #amber
snsei has quit [Remote host closed the connection]
snsei has joined #amber
snsei has quit [Remote host closed the connection]