noob_on_rails

Activity Graph

Page 1 of 7 | Next »

2019-05-02

[20:14:05] noob_on_rails: Quit: KVIrc 4.9.3 Aria http://www.kvirc.net/

2019-04-24

[13:09:41] noob_on_rails: has joined #RubyOnRails
[13:09:55] noob_on_rails: hey all! :) anyone has any idea why this happens? https://gist.github.com/frcake/50fe42845564f260949e90da6c0e9196a
[13:23:39] noob_on_rails: hmm maybe ill change name

2019-01-10

[11:24:25] noob_on_rails: Quit: Changing server...

2019-01-09

[14:32:17] noob_on_rails: has joined #RubyOnRails

2018-12-19

[18:00:28] noob_on_rails: Quit: KVIrc 4.9.3 Aria http://www.kvirc.net/

2018-12-17

[12:33:12] noob_on_rails: has joined #RubyOnRails
[12:34:08] noob_on_rails: hey all, in a transaction block like this -> https://gist.github.com/frcake/365e83ca843e905a9f5cbec1fceed42f
[12:34:42] noob_on_rails: where the collection is a set of instantiated objects ready to be saved, why would rails let the first model get saved, if the second one fails due to a validation error ?
[12:41:30] noob_on_rails: also a relevant post about it https://www.ruby-forum.com/t/how-can-i-handle-multiple-models-saves-in-a-single-transactional/134496/7 , am i doing something very wrong here?
[13:03:40] noob_on_rails: https://gist.github.com/frcake/365e83ca843e905a9f5cbec1fceed42f <- the working.rb gist is working.. still don't get why

2018-12-07

[19:53:25] noob_on_rails: Quit: KVIrc 4.9.3 Aria http://www.kvirc.net/

2018-12-06

[17:11:04] noob_on_rails: has joined #RubyOnRails
[17:12:04] noob_on_rails: hey all, can i declare a string like str = 'hello my name is :name' and then declare name = john and then puts str #=> 'hello my name is john' ?
[17:12:55] noob_on_rails: without eval maybe

2018-09-17

[12:52:27] noob_on_rails: has joined #RubyOnRails
[15:09:20] noob_on_rails: Read error: Connection reset by peer

2018-09-11

[07:59:39] noob_on_rails: Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/
[08:00:00] noob_on_rails: has joined #RubyOnRails
[15:28:49] noob_on_rails: Remote host closed the connection

2018-09-06

[08:22:44] noob_on_rails: has joined #RubyOnRails

2018-09-05

[12:12:20] noob_on_rails: has joined #RubyOnRails
[13:39:26] noob_on_rails: Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/

2018-09-04

[08:38:45] noob_on_rails: Ping timeout: 252 seconds

2018-09-03

[10:33:40] noob_on_rails: has joined #RubyOnRails
[10:34:32] noob_on_rails: hey all if i have a = [1,2,3] and b = [0,1] how can i use b so i get what i would if i just a[0,1] #=> [1,2]
[10:50:12] noob_on_rails: i have a hash which contains data like user1: [1,2,5] , which those corespond to the index number of the things i want to return for this user , from another array
[10:53:50] noob_on_rails: TvL2386: i was trying not to iterate
[10:53:57] noob_on_rails: at least "syntactically"
[10:56:46] noob_on_rails: ya i think it's clean enough for what i want to do
[11:40:54] noob_on_rails: Ping timeout: 252 seconds
[11:56:38] noob_on_rails: has joined #RubyOnRails

2018-06-29

[06:40:24] noob_on_rails: Ping timeout: 256 seconds
[07:35:38] noob_on_rails: has joined #RubyOnRails
[11:43:00] noob_on_rails: Ping timeout: 256 seconds
[13:44:06] noob_on_rails: has joined #RubyOnRails
[13:52:12] noob_on_rails: Ping timeout: 256 seconds

2018-06-28

[00:19:08] noob_on_rails: Ping timeout: 256 seconds
[07:09:53] noob_on_rails: has joined #RubyOnRails

2018-06-27

[11:20:53] noob_on_rails: has joined #RubyOnRails
[14:23:00] noob_on_rails: Ping timeout: 256 seconds
[15:09:50] noob_on_rails: has joined #RubyOnRails

2018-06-18

[07:32:45] noob_on_rails: Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/

2018-06-15

[07:53:49] noob_on_rails: has joined #RubyOnRails

2018-06-14

[07:58:26] noob_on_rails: has joined #RubyOnRails
[08:34:06] noob_on_rails: Ping timeout: 256 seconds
[09:11:31] noob_on_rails: has joined #RubyOnRails
[09:55:08] noob_on_rails: Ping timeout: 256 seconds
[10:30:35] noob_on_rails: has joined #RubyOnRails
[13:32:44] noob_on_rails: Ping timeout: 256 seconds

2018-06-13

[18:29:27] noob_on_rails: has joined #RubyOnRails
[18:30:34] noob_on_rails: hey all , is there any resource i can search to see examples or learn how to setup a rails app with both , local authentication (token/devise) *and* CAS authentication ?
[18:32:49] noob_on_rails: sorry for the broad terms but i cant seem to find anything related..
[18:35:48] noob_on_rails: hey dminuoso :), well i have an app where the internal users log in with knock (currently), but external users need to be authenticated from a CAS server. The app atm is setup with Ember JS in the frontend.
[18:36:17] noob_on_rails: so there's 2 types of users and each has one type of authentication
[18:36:35] noob_on_rails: knock users are locally stored in my DB
[18:37:01] noob_on_rails: and CAS users are in a system where i can only obtain the html login page
[18:37:32] noob_on_rails: is this a general advice or a specific one ?
[18:38:11] noob_on_rails: so maybe a custom rails auth , with CASino (rbCAS)
[18:38:21] noob_on_rails: and knock , and fight my way through ?
[18:38:42] noob_on_rails: dminuoso: agreed!
[18:38:51] noob_on_rails: i feel that many times as well
[18:41:56] noob_on_rails: ya, warden and bcrypt are fine i guess
[18:43:17] noob_on_rails: dminuoso: about the resource for further reading, do you have any in mind ?
[18:45:40] noob_on_rails: well , a way to know if someone has an access to a resource or not (i guess)
[18:46:05] noob_on_rails: oh , ok , which goes first
[18:46:49] noob_on_rails: authentication , is a way to know who this someone is , and if he is registered in your application(or ecosystem..)
[18:49:05] noob_on_rails: at the moment you log in there some kind of hash code generated that follows you until it either expires or you log out ?
[18:50:25] noob_on_rails: well if the user tries to access a route/controller action which needs him to be authenticated , you have to check if the browsers hash aligns with the stored hash
[18:53:17] noob_on_rails: hmm yea i get what you want to say
[18:53:52] noob_on_rails: whatever the backend has to do with CAS or no CAS , it all ends up if the token created upon a specific time and reason (CAS / local) is the right one
[18:56:46] noob_on_rails: but in the CAS case , the request should contain the token , which is paired with the ST ticket? or only the token and have it paired in the BE
[18:58:16] noob_on_rails: CAS servers issue a ticket starting with STXXXXXX , be = backend
[18:59:30] noob_on_rails: no CAS is a central authentication system , an outer source which lets you authenticate your users , so they can access all your apps
[19:00:07] noob_on_rails: oh , no :) just the normal cas :)
[19:01:10] noob_on_rails: i think implementing something custom , in order to have more control seems like the way to go
[19:06:11] noob_on_rails: hmmm , ill surely look into this , thanks !
[19:33:15] noob_on_rails: Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/

2018-02-28

[10:12:20] noob_on_rails: has joined #RubyOnRails
[15:12:20] noob_on_rails: Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/

2018-02-21

[08:36:52] noob_on_rails: has joined #RubyOnRails
[10:19:28] noob_on_rails: Ping timeout: 256 seconds

2018-02-07

[19:40:01] noob_on_rails: Disconnected by services

2018-02-05

[08:13:20] noob_on_rails: has joined #RubyOnRails

2018-01-28

[04:33:06] noob_on_rails: Remote host closed the connection

2018-01-27

[17:31:48] noob_on_rails: has joined #RubyOnRails
[19:09:32] noob_on_rails: Ping timeout: 256 seconds
[23:02:24] noob_on_rails: has joined #RubyOnRails

2018-01-26

[13:22:55] noob_on_rails: has joined #ruby
[13:23:15] noob_on_rails: hey all , i want to create a concern , which uses a scope from another concern
[13:23:57] noob_on_rails: but i get : undefined method `scope' for Rangeable:Module , ActionController::RoutingError (undefined method `scope' for Rangeable:Module):
[13:24:24] noob_on_rails: i have included the concern in the one concern im trying to create
[13:25:20] noob_on_rails: umm , hey dminuoso!
[13:25:26] noob_on_rails: not sure i quite understand!
[13:25:58] noob_on_rails: oh im stupid sorry
[13:26:03] noob_on_rails: has joined #RubyOnRails
[13:26:52] noob_on_rails: hey all i want to create a concern which uses this from another concern scope :sorted, ->(attr_name, asc) { order("#{attr_name} #{asc}") }
[13:27:36] noob_on_rails: while i have included the concern in mine , i get this:undefined method `scope' for Rangeable:Module , ActionController::RoutingError (undefined method `scope' for Rangeable:Module):
[13:27:43] noob_on_rails: let me gist some cod
[13:32:02] noob_on_rails: https://gist.github.com/frcake/f229592208eec30a6aee66f74857565b#file-instance-rb-L125
[13:32:22] noob_on_rails: in this line and below , you can see the methods i want to DRY up using a concern
[13:32:32] noob_on_rails: the concern im trying to implement is Rangeable.rb
[13:41:03] noob_on_rails: dminuoso: you can really just ignore the most part in ParametersMethods.rb except ln:10
[13:41:19] noob_on_rails: and in instance.rb you can ignore the whole model except ln:117 and below
[13:41:26] noob_on_rails: which are the methods inside the rangeable concern
[13:41:40] noob_on_rails: i know dminuoso, you are right but
[13:42:55] noob_on_rails: you are talking about rangeable.rb?
[13:43:49] noob_on_rails: to tell you the truth , im in the process of trying to learn how to use these , i could do it with a flat module tho
[13:44:00] noob_on_rails: i haven't found resources that help me wrap my head around this
[13:44:43] noob_on_rails: i understand most of the meta , but what you say is true
[13:45:08] noob_on_rails: i thought it'd be simpler
[13:46:31] noob_on_rails: you are completely right!
[13:47:58] noob_on_rails: ok lets see ill just make a small method which i want to be in my concern and tryout
[13:54:59] noob_on_rails: should i refactor this to a module? cause right now it looks like an inheritance scheme
[14:00:30] noob_on_rails: dminuoso: https://repl.it/@frcake/IllegalNeighboringPolarbear
[14:00:36] noob_on_rails: is that what i should've done ?
[14:01:46] noob_on_rails: oh i still inherit from Base
[14:14:10] noob_on_rails: dminuoso: https://repl.it/@frcake/IllegalNeighboringPolarbear :O
[14:15:14] noob_on_rails: since the class which derives from base , includes the modules , i am able to use Base.method
[14:15:27] noob_on_rails: that's straightforward
[14:18:38] noob_on_rails: so im still wrong right?
[14:19:10] noob_on_rails: oh sorry missed that
[14:20:01] noob_on_rails: it actually has to do things when the methods are called , im not opposing to what you say
[14:20:10] noob_on_rails: cause maybe what i'm trying to implement
[14:20:13] noob_on_rails: is what you say
[14:20:21] noob_on_rails: cause by what i just said
[14:20:32] noob_on_rails: it's a flat module?
[14:21:00] noob_on_rails: yep , i am definately confused :D
[14:29:06] noob_on_rails: oh , so this explains a lot
[14:29:14] noob_on_rails: 1st thing i understand is that whatever
[14:29:32] noob_on_rails: is in the included hook executes upon inclusion
[14:29:35] noob_on_rails: like an initializer
[14:30:44] noob_on_rails: also base is passed as an argument hmm is base = Base.new?
[14:32:02] noob_on_rails: hmm , base is Derived2
[14:32:32] noob_on_rails: and it acts like self to an inheritance scheme
[14:33:18] noob_on_rails: althought my last statement could be 100% invalid lul :D
[14:39:26] noob_on_rails: i perceive interfaces more as behavioural patterns
[14:39:30] noob_on_rails: and contracts ofc
[14:40:09] noob_on_rails: yeap we've discussed this before , and it's quite true
[14:41:25] noob_on_rails: and for abstractions between irrelevant models you use inheritance schemes?
[14:42:02] noob_on_rails: or to say _share code_
[14:43:42] noob_on_rails: like an anonymous polymorphism idea
[14:43:52] noob_on_rails: i think i understand what you say
[14:45:04] noob_on_rails: but in ruby everything being an object kinda uses polymorphism in a very loose way
[14:45:12] noob_on_rails: more like polyfunctional or something
[14:46:06] noob_on_rails: so if you avoid inheritance , which i end up doing too
[14:46:13] noob_on_rails: how do you share code?
[14:46:37] noob_on_rails: i mean , if you have an obvious inheritance scheme in front of you , you would use it , no
[14:47:28] noob_on_rails: so , even with this approach , no DRY ? or modules?
[14:48:39] noob_on_rails: i get what you say , so you provide certain "abilities" to your nested stuff under your module/namespace
[14:49:47] noob_on_rails: so your coding should be very very slim and explanatory , use this take that and go on
[14:50:09] noob_on_rails: like not using what you define for more than one mechanism
[14:51:49] noob_on_rails: true , and is it just because he can?
[14:52:26] noob_on_rails: i mean , you say that including stuff , may lead to stupid use of these stuff , just cause they're included
[14:54:33] noob_on_rails: haha , a very enjoyable talk , it's raining questionmarks above me right now , but i think ill surely come accross all these in the near future
[14:55:34] noob_on_rails: JJonah: why don't you try it :O
[14:58:30] noob_on_rails: a functioning record meaning , even if i include these A stuff , this guy can do only these B stuff?
[14:58:33] noob_on_rails: somethign like that ?
[14:59:18] noob_on_rails: ah i only use js as a tool , never really got into what's what
[14:59:41] noob_on_rails: maybe a reference to another lang would help me understand
[15:00:40] noob_on_rails: dminuoso: monkey patching-like?
[15:03:22] noob_on_rails: umm kindof yea
[15:04:25] noob_on_rails: so you want to barrier the requirement to the extend where's needed
[15:04:36] noob_on_rails: and not till the whole thing
[15:26:31] noob_on_rails: as a sidequestion , do you say all these from an enterprise perspective?
[15:26:41] noob_on_rails: like ror is trying to fill some bigger shoes?
[15:27:23] noob_on_rails: like , trying to tackle projects java would eat for breakfast in terms of coding / contracting / partializing etc?
[16:56:00] noob_on_rails: Remote host closed the connection
[17:56:49] noob_on_rails: has joined #RubyOnRails
[18:02:12] noob_on_rails: Ping timeout: 256 seconds
[18:17:49] noob_on_rails: has joined #RubyOnRails
[21:43:12] noob_on_rails: Ping timeout: 256 seconds

2018-01-22

[16:59:48] noob_on_rails: Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/

2018-01-21

[15:35:12] noob_on_rails: has joined #RubyOnRails

2018-01-17

[10:08:07] noob_on_rails: has joined #RubyOnRails
[15:03:22] noob_on_rails: Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/

2018-01-16

[11:03:26] noob_on_rails: has joined #RubyOnRails
[15:05:51] noob_on_rails: Remote host closed the connection

2018-01-15

[13:26:33] noob_on_rails: has joined #RubyOnRails
[13:27:19] noob_on_rails: hey all, if im using ActiveRecord::Base.connection.execute(sql).to_a to make some custom sql queries
[13:27:28] noob_on_rails: should i somehow handle the connection afterwards?
[13:27:45] noob_on_rails: im getting an accumulative lag when spamming
[13:28:08] noob_on_rails: first time rails shoots it like nothing , but afterwards starts lagging each time the code runs
[13:29:06] noob_on_rails: dminuoso: oh it figures , also : https://github.com/rails/rails/issues/22331
[13:29:52] noob_on_rails: ah code was already there , i should've defied it though
[13:29:58] noob_on_rails: :D thank you dminuoso :D
[13:33:00] noob_on_rails: cool , ill start by resolving the performance issue with exec_query and then refactor to select_rows/_one
[13:33:07] noob_on_rails: cool stuff! :D
[13:35:17] noob_on_rails: yea i was eyeing it as we speak
[13:42:51] noob_on_rails: and of course docker comes into play : Mysql2::Error: Unknown MySQL server host 'mariadb' (-2)
[13:43:32] noob_on_rails: while using ActiveRecord::Base.connection methods we talked about! :D
[15:57:26] noob_on_rails: Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/

2018-01-14

[18:10:08] noob_on_rails: has joined #RubyOnRails
[23:45:06] noob_on_rails: Ping timeout: 256 seconds

2018-01-11

[08:28:57] noob_on_rails: has joined #RubyOnRails
[11:52:20] noob_on_rails: Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/

2018-01-10

[14:23:07] noob_on_rails: dminuoso: Well imagine there was a module called `Printable` which would require you to implement some `to_string`
[14:23:16] noob_on_rails: but , Printable module
[14:23:41] noob_on_rails: i mean , does the module require you to implement something?
[14:24:07] noob_on_rails: https://richonrails.com/articles/rails-4-code-concerns-in-active-record-models <- this guy here , implements everything in the concern
[14:24:12] noob_on_rails: and just include Authentication
[14:24:38] noob_on_rails: i do understand a big part of what you say though
[14:27:50] noob_on_rails: damn i have to do some reading :D
[14:28:02] noob_on_rails: advanced stuff :D
[14:28:17] noob_on_rails: actually ill come in 20 mins and give it a look
[14:28:22] noob_on_rails: let me end something
[14:28:28] noob_on_rails: thanks for all this man
[14:29:04] noob_on_rails: hmm it's a cool idea
[14:30:24] noob_on_rails: ok , give me some time ill be back to read this better
[14:30:35] noob_on_rails: i have to fly atm brb , thanks tons!:D
[14:31:00] noob_on_rails: Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/