<FromGitter>
<rmarronnier> Is there an example of how to initialize an OriginType object ?
<FromGitter>
<rmarronnier> This looks cryptic to me : ''["*", %r()]''
<FromGitter>
<rmarronnier> I got this pipe working, but without putting any arguments (not safe :-) )
<FromGitter>
<Blacksmoke16> sec
<FromGitter>
<Blacksmoke16> it just an alias for `Array(String | Regex)` @rmarronnier
<FromGitter>
<Blacksmoke16> default value is `"*"` and empty regex that would match everything
<FromGitter>
<nsuchy> Hi so I really like Amber so far and it's working great. I want to implement file upload and make sure that only an authenticated user can download a file. I already have a `current_user` method. How might I go about restricting who can and cannot download a specific file?
<FromGitter>
<nsuchy> I'd also like to check against its database entry to make sure `is_deleted` is set to false
<FromGitter>
<nsuchy> if anyone has published a project on GitHub that makes use of file uploads I'd like to see :)
<FromGitter>
<Blacksmoke16> What form of auth are you using?
<FromGitter>
<Blacksmoke16> Probably would have to setup some form of permissions then check it before processing the request.
<FromGitter>
<Blacksmoke16> I'm unsure if there is anything built in to help with that
<FromGitter>
<Blacksmoke16> deleted_at might work better as well, same idea but you also get record of when it was deleted
<FromGitter>
<nsuchy> I'm using Amber's auth generator
<FromGitter>
<nsuchy> I saw the cookbook entry already, was more of looking to write a route that looks up a database entry by id then checks that it's not soft deleted then finally returns the file if all checks pass
<FromGitter>
<Blacksmoke16> pull param from url, do a db query like `Model.where(deleted_at: nil)`
<FromGitter>
<Blacksmoke16> or whatever your query would be
<FromGitter>
<Blacksmoke16> i guess more like `Model.find_by(deleted_at: nil, id: params[:id])`
<FromGitter>
<Blacksmoke16> which then could do like
_whitelogger has joined #amber
<FromGitter>
<Blacksmoke16> anyway im off to bed
<FromGitter>
<pynixwang> granite now has no lock impliment
<FromGitter>
<anamba> hi all, long time. just a quick mention in case anyone is in a similar situation. i needed to work with liquid templates and TechMagister's shard was a decent starting point, but nowhere near usable for what i'm doing, so i've been hacking at it on my own: https://github.com/anamba/liquid.cr hoping to merge back someday, but not really my top priority at the moment
<FromGitter>
<silmanduin66> hi, i have a webpack question. Amber generates a main.bundle.js file . I' m trying to export a function with ⏎ ⏎ ```export function hello() { ⏎ console.log("hello"); ⏎ }``` [https://gitter.im/amberframework/amber?at=5cb56e7c93fb4a7dc238bed8]
<FromGitter>
<silmanduin66> and i got this in the ```main.bundle.js```
<FromGitter>
<silmanduin66> ```code paste, see link```
<FromGitter>
<silmanduin66> can anyone tell me how can i use that function ?
<FromGitter>
<anamba> webpack makes cry. i use faucet
<FromGitter>
<silmanduin66> the problem is that my hello function within is not accessible by my ```onclick``` within the same file
<FromGitter>
<damianham> @anamba I sent you an invite to AmberCommunity - it might be a good idea to add your liquid shard to AmberCommunity as we use liquid for recipes so it would be a good candidate for us to maintain collectively.
<FromGitter>
<damianham> @silmanduin66 what is your front end environment ? I can't forsee a need to ever look at the contents of the bundle.
<FromGitter>
<damianham> @mixflame I had a look at some of the commits in other forks but I am unsure about which ones are good candidates to merge in. I suppose I could ask the fork authors for the reasoning behind their changes.
<FromGitter>
<silmanduin66> I am not using anything else other than the amber.js, all my code is self made (i'm coding from scratch in js since i m thinking to rewrite this later for WebAssembly )
<FromGitter>
<rmarronnier> @Blacksmoke16 thanks, gonna check this tonight
feepbot has quit [Ping timeout: 250 seconds]
feepbot has joined #amber
_whitelogger has joined #amber
<FromGitter>
<Blacksmoke16> 👍
<FromGitter>
<mixflame> @damianham I'm personally unsure what the edits would have been. @sam0x17 might know more. if not I guess we will fix stuff when we run into it
<FromGitter>
<mixflame> i haven't run into anything in livepost
<FromGitter>
<ikaru5> Hello guys :D ⏎ Just started learning amber. Coming from Rails I have a question: Is there anything like jobs? ⏎ Or another scheduling technology? Im trying to port my Rails-Web-Game to amber and need something to run every few seconds... ⏎ Or should I just create a seperate file with a combination of loop and wait and run it in an own thread? [https://gitter.im/amberframework/amber?at=5cb610cdb4700e023d81a607]
<FromGitter>
<Blacksmoke16> can you see if you can reproduce it outside of amber? i.e. create a new file define your db adapter, create the model, then try the query?