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
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> <beydogan> hi, could someone help me for the following example? https://docs.amberframework.org/amber/guides/controllers/params-validation#organizing-validations ⏎ ⏎ I don't know how `UserParams` should look like. I tried some stuff but no luck. Can you help me? I will also create a PR for docs if I can figure it out.
feepbot has quit [Ping timeout: 244 seconds]
feepbot has joined #amber
<FromGitter> <Blacksmoke16> i imagine its just a JSON object
<FromGitter> <Blacksmoke16> @beydogan
<FromGitter> <beydogan> @Blacksmoke16 I don't think so because it has "include UserParams"
feepbot has quit [Ping timeout: 240 seconds]
feepbot has joined #amber
<FromGitter> <Blacksmoke16> its prob just an example module used to store the logic of what the user parmas are
<FromGitter> <Blacksmoke16> i.e.
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5bf56f19e25cc274051eefd3]
<FromGitter> <Blacksmoke16> would be my guess, that example should be more clear imo
<FromGitter> <Blacksmoke16> another one for aggregate query `min, max, avg` coming soon
snsei has joined #amber
snsei has quit [Remote host closed the connection]
snsei has joined #amber
snsei has quit [Ping timeout: 250 seconds]
<FromGitter> <charleystran> does anyone have advice or documentation on how to work with dates in forms? I tried to submit as '2018-11-10' but it didnt work
<FromGitter> <naiyt> Hi! Just started playing around with Amber. Anybody know if there's been any work on a multi-tenancy shard, a la Apartment? https://github.com/influitive/apartment ⏎ ⏎ If not, I was thinking about taking a crack at writing one
<FromGitter> <Blacksmoke16> not that im aware of
<FromGitter> <Blacksmoke16> wait
<FromGitter> <Blacksmoke16> what does that do?
<FromGitter> <Blacksmoke16> just allow certain models to use diff db connections?
<FromGitter> <naiyt> It helps you create and manage different database tenants. I've mainly used it with postgres, where the terminology is "schema", which is a bit confusing, but it's basically just another instance of your database that's been namespaced. Makes it easy to write an application that can sequester data based on accounts or organizations. That gem just does a few nice things, like create the extra schemas for you, run your
<FromGitter> ... migrations in all of them, and automatically switch schemas based on stuff like host name or subdomain or whatever
<FromGitter> <naiyt> (I believe the MySQL implementation creates separate dbs, and then switches the connection for you, yeah)
<FromGitter> <Blacksmoke16> yea i dont think crystal has anything like that atm?
<FromGitter> <naiyt> Doesn't look like it, couldn't find anything from searching
<FromGitter> <Blacksmoke16> granite supports multiple adapters, so like https://github.com/amberframework/granite/blob/master/docs/getting_started.md#adapters
<FromGitter> <Blacksmoke16> which would be a basic implementation i guess?
snsei has joined #amber
<FromGitter> <naiyt> Ah, interesting. Sort of a similar idea, although with something like apartment all of your models are still using the same adapter, but the actual database (or "schema") they're reading from will change based on the request
<FromGitter> <naiyt> That is a cool feature though
<FromGitter> <Blacksmoke16> i use 2 adapters that i have mapped to two diff schemas in pg
<FromGitter> <Blacksmoke16> that use same db
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5bf5c74ff59704348ee20f92]
<FromGitter> <Blacksmoke16> so in my model i could do `adapter schema1`
snsei has quit [Ping timeout: 252 seconds]
<FromGitter> <Blacksmoke16> however its just a macro so i *guess* you could override the adapter based on some string match from ENV variable or whatever on init
<FromGitter> <Blacksmoke16> issue you going to run into is making something that will work for every db ORM
<FromGitter> <Blacksmoke16> vs in rails they just have to deal with AR
<FromGitter> <Blacksmoke16> class variable i mean*
<FromGitter> <charleystran> I just want to rebump how to work with dates in forms. What is the proper format to send dates to granite?
<FromGitter> <Blacksmoke16> lets see
<FromGitter> <Blacksmoke16> whats the error?
<FromGitter> <charleystran> there is no error, it just doesnt save a value
<FromGitter> <charleystran> in rails there is date helper for the view, but there is no documentation on the format that amber expects for a date field
<FromGitter> <charleystran> I could translate and such, but I just dont know what to translate too
<FromGitter> <Blacksmoke16> yea i dunno
<FromGitter> <Blacksmoke16> doesnt save a value to db?
<FromGitter> <Blacksmoke16> any error from db?
<FromGitter> <Blacksmoke16> its prob coming thru as a string and you're trying to save a string to a datetime field in db