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]
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]
<robacarp>
@blacksmoke16 good reminder, thanks
wontruefree has joined #amber
<FromGitter>
<rishavs> In granite, do we support something like `virtual` type for models? For example, I would want to set the password field in my User model to virtual. This will ensure I can do all the validations on it but any input in this field will not propagated to the db.
<FromGitter>
<Blacksmoke16> i dont think so
<FromGitter>
<Blacksmoke16> nvm i reread your sentence
<FromGitter>
<Blacksmoke16> what reasoning would you have for doing validation on a password but not saving it?
<FromGitter>
<Blacksmoke16> @rishavs
<FromGitter>
<rishavs> I was be saving the pass_hash which was generated after using bcrypt on it
<FromGitter>
<rishavs> The password data itself will be discarded
<FromGitter>
<Blacksmoke16> right, but wouldnt/couldnt you do the hashing in a like before_save handler?
<FromGitter>
<Blacksmoke16> i.e gets initialized with plaintext password but gets saved as hashed
<FromGitter>
<rishavs> hmmm.... I haven't tried that. Thanks for the suggestion. So far I was aving both password and password_hash fields in my db and was just keping the password column empty, which looked like a very inelegant way to doing things
<FromGitter>
<rishavs> I am actually using uuids. Can't believe I never made that connection -__-
<FromGitter>
<Blacksmoke16> :p np
<FromGitter>
<rishavs> Thanks for all the help š
prutheus has joined #amber
<prutheus>
Is it possible to have multiple WebSocket::Channels connected to one Websocket? I have defiend multiple channels and wanted to connect them into one socket by putting for each channel at the socket: channel "name", NameChannel at the first line in the class channels: https://bpaste.net/show/2592b0163a2f and https://bpaste.net/show/23a9c9e7da84 .... and socket: https://bpaste.net/show/67a875b08af8 I have the problem that when i w
<prutheus>
...I have the problem that when i wanna join both channels I just join the data channel, doesnt matter if my websocket client has the topic 'calculation'
<FromGitter>
<shobhitic> Is there a way to look at logs on production (i.e. `--release` based binary)? Where are they stored?
<FromGitter>
<rishavs> How do I write; if var exists and if var == xxx, do something? ā I tried ` <%- if res && res["status"] == "error" -%>` in my ecr template but get ā ā ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5b3342477da8cd7c8c71625a]
<FromGitter>
<shobhitic> You haven't defined the `res` variable anywhere.
wontruefree has quit [Quit: bye]
<FromGitter>
<rishavs> yep. the variable doesnt exists yet. Can i not create a conditional where i check if the var exists
<prutheus>
Has anybody an idea for my problem with websockets and channels i posted some minutes ago?
<FromGitter>
<shobhitic> @prutheus Sorry, haven't had any experience with websockets
<prutheus>
But maybe you can find my mistake anyway?
<FromGitter>
<shobhitic> Give me 10 minutes, I haven't been following it
<prutheus>
sure, no hurry
<FromGitter>
<set> Hi everyone!
<FromGitter>
<set> When I run Okullar.all("WHERE username = ? && sifre = ?", [params[:username],params[:password]) query, Postgres saying 'syntax error at or near "="'
<FromGitter>
<set> Wh?
<FromGitter>
<shobhitic> I think `&&` should be `AND`
marenz has joined #amber
<FromGitter>
<set> @shobhitic bro, thank you :) It show error just post page, I don't know why. I fixed this, thank you :)
<FromGitter>
<damianham> @set maybe a blank username or password if 'sifre' is the real column name. If 'sifre' is not the column that is probably your issue
<FromGitter>
<set> no @damianham
<FromGitter>
<set> is real column name, that I wrote it wrong here
<FromGitter>
<shobhitic> @rishavs There must the name of exception which is raised
<FromGitter>
<Blacksmoke16> @rishavs I think the issue is password could be nil
<FromGitter>
<Blacksmoke16> you would either have to validate that it isnt nil before creating it or can do like
<FromGitter>
<Blacksmoke16> using the `!` on field for password to tell Granite it is a not null column
<FromGitter>
<Blacksmoke16> and might want to use `@password` in your create vs just `password` not sure if that matters
<FromGitter>
<Blacksmoke16> or do what Damian said, could add an else to that to raise an exception if password isnt set
<prutheus>
@faustinoaq are you there?
<FromGitter>
<rishavs> thanks guys, using `field! password : String` solved it. though i am surprised. If we have this `!` operator, why do we even need ` validate_not_nil :password`
<prutheus>
I have the problem that when i wanna join both channels I just join the data channel, doesnt matter if my websocket client has the topic 'calculation
<prutheus>
anyone an idea?
marenz has quit [Ping timeout: 260 seconds]
<prutheus>
I only get my client connected to the channel which comes first in my socket, but the topic is 'calculation', in my data channel i receive at the joined function a message with the topic 'calculation' should this not be not possible?
<FromGitter>
<rishavs> Sorry prutheus. Haven't tried websockets. If you are really blocked, you should also try the main crystal channel. It is currently more active.
<prutheus>
thanks
<FromGitter>
<Blacksmoke16> @rishavs `validate_not_blank` might be better?
<FromGitter>
<Blacksmoke16> as the `!` should prevent instantiating a new user class without a password, but it could be an empty string
<FromGitter>
<Blacksmoke16> i think, would have to test what happens if you create a new user obj w/o a password...
wontruefree has joined #amber
wontruefree has quit [Quit: bye]
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #amber
wontruefree has joined #amber
vivus has quit [Quit: Leaving]
wontruefree has quit [Quit: this is not the client you are looking for]
<FromGitter>
<set> Again hello :) Showed me "Can't infer the type of instance variable '@teacher' of TeacherController" error when I run @teacher = Teacher.find(id) code
<FromGitter>
<set> query just running local variables, if I try @var or @@var not working
<FromGitter>
<set> Why?
<FromGitter>
<set> edit: This error valid for before_action method
<FromGitter>
<sdzyba> Hey everyone. ā Is there any way to initialize the new Amber project in API mode? i.e. without any included front end functionality like nodejs dependency
<FromGitter>
<sdzyba> or is it just ok to delete that by myself?
<FromGitter>
<valenciaj> Hi there!
<FromGitter>
<valenciaj> I'm trying Amber, and need some feedback about how to nested routes?
<FromGitter>
<valenciaj> resources don't have a block in the same way as rails?
<FromGitter>
<valenciaj> I know, resources it's a macro.
<prutheus>
@faustinoaq are you there?
<FromGitter>
<robacarp> @sdzyba the best thing to do is prune the generated application. There is some functionality to generate apps from recipes, but Iām not sure of the status of it at the moment.
prutheus has quit [Quit: Page closed]
<FromGitter>
<eliasjpr> Javier there should be an api generator for amber