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> <anity_gitlab> Hello everyone, My name is Phong, I'm new to Amber. ⏎ I'm creating a simple project with Amber but I don't know how to include image in Slang with the right way (cwl). Does anyone can guide me? thank in advance.
<FromGitter> <anity_gitlab> I've tried with `img src="../images/logo.png"` or `/logo.png`. But the both ways are not work
<FromGitter> <anity_gitlab> I've fixed my problem by reading old messages. Thank everyone
<FromGitter> <Thellior> @anity_gitlab Could you share your solution :)
<FromGitter> <Thellior> I was looking for you in docs but could find anything
<FromGitter> <Thellior> But it’s nice to know how it’s working
<FromGitter> <c910335> Move the images to public folder. ⏎ `public/images/logo.png` and `img src="/images/logo.png"`
feepbot has quit [Remote host closed the connection]
<FromGitter> <byteg> Hi again! How can I preload an association (belongs_to) with Granite ? I want to avoid N+1 requests to my db.
<FromGitter> <byteg> I want to preload it with JOIN. If I just write MyModel.all("LEFT JOIN another_model ..."), then I get the error: ⏎ ERROR: missing FROM-clause entry for table "another_model" (PQ::PQError)
<FromGitter> <anity_gitlab> > @anity_gitlab Could you share your solution :) ⏎ Hi Erwin, I've used the copy webpack plugin to copy all images in assets/images -> public/dist/images ⏎ I'm think Amber will better if use this plugin by default or more document about it
<FromGitter> <Thellior> OK thanks for sharing :)
<FromGitter> <drujensen> @anity_gitlab if its not already doing that then I think you uncovered a bug.
<FromGitter> <drujensen> @byteg For Granite, the `SELECT table_name.fields, … FROM table_name` is preprended to the `all` method
<FromGitter> <drujensen> we have started working on a query builder to make this easier to maintain
<FromGitter> <drujensen> but currently you will need to write the SQL. Can you provide the query you are trying to generate?
<FromGitter> <byteg> > but currently you will need to write the SQL. Can you provide the query you are trying to generate? ⏎ SELECT "tasks"."id", "tasks"."field1", "task_limits"."field1", "task_limits"."field2" FROM "tasks" LEFT JOIN task_limits ON tasks.task_limit_id = tasks_limits.id WHERE ... ;
<FromGitter> <byteg> @drujensen I couldn't find the way to specify the SELECT part(what fields from what tables to select). All the JOIN and WHERE parts I can write in the .all() method
<FromGitter> <drujensen> If you run that query directly against PQ it works?
<FromGitter> <drujensen> ooohhh, there is a `select` macro
<FromGitter> <drujensen> but just be aware, you can
<FromGitter> <byteg> @drujensen yes, I've tried it already. But in this case I get an error with my WHERE part
<FromGitter> <byteg> @drujensen I think it might be my case, I'll try it. I tried to use it in my model, didn't try with a view
<FromGitter> <drujensen> we should spit out the SQL in the logs so you can see where the error is (if we don’t do that already)
<FromGitter> <byteg> @drujensen how can I pass array to write IN condition? ⏎ Task.all("WHERE id IN(?)", [[43, 44, 45]]) ⏎ doesn't work. It says: ⏎ Unhandled exception: invalid input syntax for integer: "{43,44,45}" (PQ::PQError) [https://gitter.im/amberframework/amber?at=5ba91a595df519473408b14b]
<FromGitter> <byteg> It seems it's better to use Crecto :) btw I couldn't manage to use Jennifer with Amber
wontruefree has joined #amber
wontruefree has quit [Quit: bye]
wontruefree has joined #amber
wontruefree has quit [Quit: bye]
<FromGitter> <drujensen> @byteg yeah, either that or create a PR in granite and help fix it. ;-)
wontruefree has joined #amber
wontruefree has quit [Quit: bye]
robacarp has quit [*.net *.split]
robacarp has joined #amber