<FromGitter>
<andrewc910> Hey everyone, I use rails for work and just started looking at Amber for personal projects.
<FromGitter>
<andrewc910> I want to contribute a bit to Amber to learn more about the framework. I'm going through the source code. Any tips people would recommend?
<FromGitter>
<eliasjpr> In regards to contributions, feel free to look at the amber framework org repositories for open issues and feel free to comment and open PRs. Docs updates a very welcome
<FromGitter>
<eliasjpr> @/all I have created this OAuth 2.0 Provider shard, please feel free to contribute https://github.com/eliasjpr/authly
<FromGitter>
<Blacksmoke16> maybe a section on how this differs/benefits of versus the stdlib OAuth2 module?
<FromGitter>
<eliasjpr> Sounds good. In a nutshell the standard lib is a client side implementation of the OAuth 2 protocol
<FromGitter>
<eliasjpr> Authly is the server side
<FromGitter>
<Blacksmoke16> ooo
<FromGitter>
<Blacksmoke16> 👍
<FromGitter>
<Blacksmoke16> *Provider shard* i missed that
<FromGitter>
<eliasjpr> ;)
<FromGitter>
<eliasjpr> :)
<FromGitter>
<eliasjpr> Also Authly is a library to help implement the server side, a building block to implement OAuth 2.0 Server provider
<FromGitter>
<eliasjpr> I am considering of creating an Amber Server that performs Authentication and Authorization using Authly
<FromGitter>
<Blacksmoke16> sounds like a plan
<FromGitter>
<andrewc910> @eliasjpr yeah I'm going through what I can. Biggest question is when and how are the controllers instantiate at runtime? It looks like Amber coverts the routes dsl in amber-router and passes that context to a http::server object. I believe this is a native crystal class?
<FromGitter>
<andrewc910> Im going through the docs as well, I came across Jennifer creto and granite. Granite is what Amber uses out of the box. Why? I can read the docs and see Jennifer's cool rails like dsl. However, what are the real merits between each model shard choice?
<FromGitter>
<Blacksmoke16> the reason i prefer Granite is, afaik, its the only one that allows using annotations on your columns
<FromGitter>
<Blacksmoke16> because under the hood they're just ivars
<FromGitter>
<andrewc910> I don't seem to know what those are. What are column annotations and why do you prefer using them?
<FromGitter>
<Blacksmoke16> which wouldnt serialize their password when you do `.to_json`
<FromGitter>
<andrewc910> That's pretty cool. I'll take a look at the links you provided 😁
<FromGitter>
<Blacksmoke16> 👍 also ofc works with other shards that may use annotations
<FromGitter>
<Blacksmoke16> i write mostly APIs so is a nice feature
<FromGitter>
<robsigler> how does one add a new field to a resource created with `amber scaffold`? re-running scaffold allows me to overwrite the old models, views and controllers with the new version, but the migrate script that is created assumes that the resource is new. is the correct course of action here to manually wriite the DB migration script to update the table schema accordingly?
<FromGitter>
<robsigler> (i've actually never used a framework with built-in scaffolding like rails or amber before, so apologies if this is a question that would be obvious if i had)
<FromGitter>
<Blacksmoke16> normally it would be its own migration
<FromGitter>
<Blacksmoke16> that adds that specific field, idt you would want to go back and add it to the original migration
<FromGitter>
<Blacksmoke16> rails maintained a `schema.rb` that represents the current schema, not sure if Amber has something similar?
<FromGitter>
<robsigler> i see. ⏎ ⏎ it seems like an `amber generate migration` might be called for. does that command do anything yet? it seems like the migration that is created is always empty regardless of args
<FromGitter>
<Blacksmoke16> :shrug:
<FromGitter>
<eliasjpr> It should generate a migration file no?