manfrin_

Activity Graph

Page 1 of 2 | Next »

2016-07-21

[15:53:08] manfrin_: has joined #RubyOnRails
[17:40:05] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…
[18:28:06] manfrin_: has joined #RubyOnRails
[23:55:34] manfrin_: Ping timeout: 240 seconds

2016-07-12

[19:30:54] manfrin_: has joined #RubyOnRails

2016-07-08

[01:01:44] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…
[05:21:16] manfrin_: has joined #RubyOnRails
[06:30:57] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…
[16:19:16] manfrin_: has joined #RubyOnRails
[23:31:41] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…

2016-07-07

[16:46:29] manfrin_: has joined #RubyOnRails
[17:45:39] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…
[17:46:04] manfrin_: has joined #RubyOnRails
[17:50:21] manfrin_: Ping timeout: 246 seconds
[18:29:14] manfrin_: has joined #RubyOnRails
[21:19:13] manfrin_: Ping timeout: 250 seconds
[22:08:08] manfrin_: has joined #RubyOnRails
[23:18:42] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…
[23:24:32] manfrin_: has joined #RubyOnRails

2016-07-06

[01:08:21] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…
[16:47:20] manfrin_: has joined #RubyOnRails
[17:23:47] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…
[18:09:18] manfrin_: has joined #RubyOnRails
[23:57:28] manfrin_: Ping timeout: 264 seconds

2016-07-05

[16:31:39] manfrin_: has joined #RubyOnRails
[16:36:17] manfrin_: Client Quit
[16:45:57] manfrin_: has joined #RubyOnRails

2016-07-01

[16:47:15] manfrin_: has joined #RubyOnRails
[18:02:48] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…
[18:56:57] manfrin_: has joined #RubyOnRails
[23:55:33] manfrin_: Ping timeout: 240 seconds

2016-06-30

[00:22:23] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…
[16:44:45] manfrin_: has joined #RubyOnRails
[23:59:56] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…

2016-06-29

[16:44:17] manfrin_: has joined #RubyOnRails
[17:57:14] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…
[19:02:16] manfrin_: has joined #RubyOnRails
[19:59:47] manfrin_: Read error: Connection reset by peer
[21:01:01] manfrin_: has joined #RubyOnRails

2016-06-21

[00:42:04] manfrin_: Ping timeout: 252 seconds
[19:19:44] manfrin_: has joined #RubyOnRails

2016-06-20

[20:48:49] manfrin_: has joined #RubyOnRails

2016-06-16

[20:41:09] manfrin_: has joined #RubyOnRails
[21:36:47] manfrin_: Read error: Connection reset by peer

2016-06-14

[00:14:28] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…
[19:33:15] manfrin_: has joined #RubyOnRails

2016-06-13

[21:33:38] manfrin_: has joined #RubyOnRails

2016-06-10

[20:18:03] manfrin_: has joined #RubyOnRails
[20:42:52] manfrin_: Ping timeout: 250 seconds

2016-06-07

[00:09:16] manfrin_: Ping timeout: 272 seconds
[19:55:40] manfrin_: has joined #RubyOnRails
[21:20:21] manfrin_: Ping timeout: 276 seconds

2016-06-06

[20:16:07] manfrin_: has joined #RubyOnRails

2016-06-02

[22:35:56] manfrin_: has joined #RubyOnRails
[23:08:47] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…

2016-05-31

[18:54:10] manfrin_: has joined #RubyOnRails

2016-05-24

[21:46:00] manfrin_: has joined #RubyOnRails
[22:46:41] manfrin_: Ping timeout: 240 seconds

2016-05-13

[19:34:32] manfrin_: has joined #RubyOnRails

2016-05-10

[21:22:23] manfrin_: has joined #RubyOnRails
[22:43:59] manfrin_: Ping timeout: 260 seconds

2016-05-09

[20:11:25] manfrin_: has joined #RubyOnRails
[22:01:51] manfrin_: Quit: Textual IRC Client: www.textualapp.com

2016-05-05

[19:41:35] manfrin_: has joined #RubyOnRails
[21:39:07] manfrin_: Ping timeout: 250 seconds

2016-05-03

[18:23:29] manfrin_: has joined #RubyOnRails
[19:15:18] manfrin_: Ping timeout: 244 seconds
[21:46:50] manfrin_: has joined #RubyOnRails
[22:20:39] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…

2016-04-28

[04:10:03] manfrin_: has joined #RubyOnRails
[06:19:10] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…

2016-04-26

[19:15:18] manfrin_: has joined #RubyOnRails
[21:55:33] manfrin_: Ping timeout: 246 seconds

2016-04-25

[20:26:32] manfrin_: has joined #RubyOnRails
[21:33:31] manfrin_: Ping timeout: 252 seconds

2016-04-14

[02:01:15] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…

2016-04-13

[18:36:30] manfrin_: has joined #RubyOnRails

2016-04-12

[00:13:27] manfrin_: Ping timeout: 244 seconds

2016-04-11

[22:19:16] manfrin_: has joined #RubyOnRails
[22:40:59] manfrin_: pundit is the cancan replacement, ye?
[22:41:04] manfrin_: ACLs are gross
[22:41:06] manfrin_: I dont blame you
[22:44:13] manfrin_: authorize is checking to see if a user's roles contains the 'role' required
[22:46:43] manfrin_: authroize is a method where it asks 'can this user do this action', so it check the user's roles (the association) for the role of the type you're authorizing ('edit posts', for example); if it exists, then then authorized? returns true
[22:48:21] manfrin_: a REALLY SIMPLE access control people do is adding an is_admin flag on users
[22:48:36] manfrin_: and then when you hit the admin panel, you have code to check user.is_admin == true?
[22:48:40] manfrin_: or user.is_admin?
[22:48:59] manfrin_: so this is taking a step further by making it an associated role, rather than a column
[22:49:18] manfrin_: right, I'm using that as an example to explain pundit
[22:49:29] manfrin_: so now instead of a column, imagine we use a join table
[22:49:33] manfrin_: called, say, Admins
[22:49:47] manfrin_: an admin is a user of they have an associated Admin association
[22:50:01] manfrin_: is_admin? just checks for user.admin.exists
[22:50:07] manfrin_: that make sense?
[22:50:14] manfrin_: so last step
[22:50:24] manfrin_: instead of checking for admin, you want to check for anything
[22:50:33] manfrin_: so say, admin, owner, post_owner, moderator, whatever
[22:50:56] manfrin_: so now instead of having is_admin? is_owner? is_post_owner? etc everywhere
[22:51:02] manfrin_: you have one authorized? method
[22:51:17] manfrin_: which checks to see if the user.roles includes the 'type' of action you want to check
[22:51:50] manfrin_: so in your comments controller, you wanna make sure someone is a moderator before they can delete a post
[22:52:15] manfrin_: so you'd do something like user.authorized?(:delete_post) (or however pundit's syntax looks, I've never used it)
[22:52:26] manfrin_: and pundit would check user.roles for a :delete_post type
[22:52:48] manfrin_: (also caveat, I am speaking very generally as to how I assume pundit does it, I havent actually used pundit)
[22:52:55] manfrin_: (but I have used other acl stuff)
[22:53:34] manfrin_: you can take it a step even further, too
[22:53:50] manfrin_: where you have a list of resources (posts, comments, etc) and actions (view, read, edit, delete, create)
[22:54:03] manfrin_: and mix-and-match
[22:54:18] manfrin_: often these will be called 'permissions', and a 'role' would be a group of persmissions
[22:54:45] manfrin_: so a moderator role would have permissions of (read, edit, delete, create); whereas a role of user would just have (read, edit,create)
[22:54:49] manfrin_: yes Darmani
[22:56:49] manfrin_: one tricky part of ACL stuff is that you sometimes have different tiers of permissions -- groups, individual permissions, etc; so a user can have permissions, but also have groups (which have their own permissions) -- authorizing means checking both the user's permissions AND the permissions of the users groups
[22:57:10] manfrin_: ACLs are tough to understand because they are like a pyramid of complexity, each step adding extra dependencies
[22:57:32] manfrin_: I think so Darmani -- I dont actually know how Pundit does it specifically
[22:57:43] manfrin_: you can check the code
[22:58:03] manfrin_: usually it's like:
[22:58:30] manfrin_: user-> permissions, group->permissions, roles->permissions, user->roles, group->roles
[22:58:35] manfrin_: it's a very big web
[22:58:59] manfrin_: but in the end you're just checking to see if a user has permissions (or roles; I dont know if pundit uses 'roles' as a group or a specific permission)
[22:59:37] manfrin_: even though it's super out dated
[22:59:41] manfrin_: I'd watch the railscast on cancan
[23:00:01] manfrin_: pundit is the spiritual successor to cancan; and Ryan Bates (who made railscasts) wrote cancan
[23:00:19] manfrin_: http://railscasts.com/episodes/385-authorization-from-scratch-part-1
[23:00:31] manfrin_: it's $9 a month, but he's been on hiatus for like 2 years and it only bills you once
[23:00:37] manfrin_: ACL is rough
[23:00:50] manfrin_: http://railscasts.com/episodes/192-authorization-with-cancan
[23:01:57] manfrin_: railscasts was probably the creme-du-la-creme of screencast sites
[23:02:01] manfrin_: but he hasnt updated in nearly 3 years
[23:02:11] manfrin_: FailBit gotta use caching
[23:02:19] manfrin_: especially if you have multi table lookups
[23:02:33] manfrin_: or write sql to pull permissions from a bunch of joins directly
[23:03:16] manfrin_: is 1/2000th a second
[23:03:29] manfrin_: 500ms you mean?
[23:04:09] manfrin_: thats lightning fast
[23:07:40] manfrin_: I think you got your timing wrong if you think .5ms is long
[23:07:46] manfrin_: .5ms is lightning
[23:07:58] manfrin_: in any language
[23:08:18] manfrin_: per check of what
[23:08:33] manfrin_: why would you be checking 10 times
[23:08:35] manfrin_: that's an n+1
[23:09:05] manfrin_: if you ever see more than 1 of any kind of lookup, you're doing something wrong
[23:09:46] manfrin_: i dont know what that question means nettoweb
[23:10:24] manfrin_: right, but your .5ms permission lookup isn't the problem, it's that your code has an n+1 in it
[23:10:45] manfrin_: nettoweb do not name functions transaction
[23:10:50] manfrin_: special word in rails
[23:10:55] manfrin_: you WILL encounter issues
[23:11:12] manfrin_: a transaction is a method that activerecord provides models in rails
[23:11:21] manfrin_: to build transactional statements
[23:11:30] manfrin_: naming a method 'transaction' is asking for problems
[23:12:51] manfrin_: smathy transaction is also an instance method
[23:31:30] manfrin_: YourManCJ https://devcenter.heroku.com/articles/rails-4-asset-pipeline

2016-04-05

[19:02:51] manfrin_: has joined #RubyOnRails
[19:33:10] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…

2016-04-04

[23:02:41] manfrin_: has joined #RubyOnRails
[23:59:57] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…

2016-03-26

[00:17:36] manfrin_: Ping timeout: 246 seconds

2016-03-25

[22:31:35] manfrin_: has joined #RubyOnRails

2016-03-23

[20:31:43] manfrin_: has joined #RubyOnRails
[20:35:51] manfrin_: Ping timeout: 244 seconds
[21:55:47] manfrin_: has joined #RubyOnRails
[23:35:33] manfrin_: Ping timeout: 240 seconds

2016-03-12

[00:10:23] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…

2016-03-11

[22:07:21] manfrin_: has joined #RubyOnRails

2016-03-09

[23:02:41] manfrin_: has joined #RubyOnRails
[23:18:19] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…

2016-03-02

[21:27:53] manfrin_: has joined #RubyOnRails
[21:30:42] manfrin_: Client Quit

2016-03-01

[20:13:19] manfrin_: has joined #RubyOnRails
[23:43:15] manfrin_: Ping timeout: 246 seconds

2016-02-26

[00:19:01] manfrin_: Ping timeout: 252 seconds

2016-02-25

[20:03:12] manfrin_: has joined #RubyOnRails
[22:30:51] manfrin_: Ping timeout: 244 seconds
[22:49:19] manfrin_: has joined #RubyOnRails

2016-02-23

[00:51:19] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…

2016-02-22

[23:57:02] manfrin_: has joined #RubyOnRails

2016-02-20

[00:35:14] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…

2016-02-19

[01:37:34] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…
[23:33:23] manfrin_: has joined #RubyOnRails

2016-02-17

[00:23:35] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz…

2016-02-16

[23:38:44] manfrin_: has joined #RubyOnRails

2016-02-03

[01:09:56] manfrin_: Ping timeout: 245 seconds

2016-02-02

[21:58:06] manfrin_: has joined #RubyOnRails

2016-01-27

[01:22:45] manfrin_: Ping timeout: 260 seconds

2016-01-26

[23:09:42] manfrin_: has joined #RubyOnRails

2016-01-11

[22:31:54] manfrin_: has joined #RubyOnRails
[22:44:33] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz???

2016-01-08

[01:26:06] manfrin_: Ping timeout: 255 seconds

2016-01-07

[21:50:27] manfrin_: has joined #RubyOnRails

2016-01-06

[00:21:49] manfrin_: Ping timeout: 245 seconds

2016-01-05

[19:17:10] manfrin_: has joined #RubyOnRails

2015-12-21

[19:53:08] manfrin_: has joined #RubyOnRails
[20:09:24] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz???

2015-12-16

[21:01:27] manfrin_: has joined #RubyOnRails
[21:29:56] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz???

2015-12-03

[00:07:27] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz???
[20:50:21] manfrin_: has joined #RubyOnRails
[23:04:44] manfrin_: Ping timeout: 245 seconds

2015-12-02

[22:30:12] manfrin_: has joined #RubyOnRails

2015-11-20

[00:00:54] manfrin_: has joined #RubyOnRails
[00:52:44] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz???

2015-11-19

[00:26:10] manfrin_: Ping timeout: 260 seconds
[20:09:53] manfrin_: has joined #RubyOnRails
[20:50:11] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz???
[22:32:07] manfrin_: has joined #RubyOnRails
[22:34:25] manfrin_: Client Quit

2015-11-18

[23:20:23] manfrin_: has joined #RubyOnRails

2015-11-09

[18:37:57] manfrin_: has joined #RubyOnRails
[19:05:31] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz???

2015-10-31

[00:15:40] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz???

2015-10-30

[23:13:34] manfrin_: has joined #RubyOnRails

2015-10-29

[20:58:45] manfrin_: Ping timeout: 255 seconds

2015-10-28

[00:00:21] manfrin_: Read error: Connection reset by peer
[00:01:00] manfrin_: has joined #RubyOnRails
[00:32:12] manfrin_: Quit: Textual IRC Client: www.textualapp.com
[00:43:01] manfrin_: has joined #RubyOnRails
[01:07:37] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz???
[19:58:10] manfrin_: has joined #RubyOnRails

2015-10-27

[19:28:35] manfrin_: has joined #RubyOnRails
[20:23:40] manfrin_: Quit: Textual IRC Client: www.textualapp.com
[20:48:00] manfrin_: has joined #RubyOnRails

2015-10-26

[18:49:39] manfrin_: has joined #RubyOnRails
[22:04:06] manfrin_: has left #RubyOnRails: ()

2015-10-23

[00:42:52] manfrin_: Ping timeout: 265 seconds

2015-10-22

[19:51:13] manfrin_: has joined #RubyOnRails

2015-10-17

[00:46:09] manfrin_: Ping timeout: 256 seconds

2015-10-16

[19:58:29] manfrin_: has joined #RubyOnRails

2015-10-15

[18:33:03] manfrin_: has joined #RubyOnRails
[18:43:21] manfrin_: Ping timeout: 250 seconds

2015-10-14

[19:05:24] manfrin_: has joined #RubyOnRails
[22:33:35] manfrin_: Ping timeout: 260 seconds

2015-10-13

[18:36:51] manfrin_: has joined #RubyOnRails
[23:49:49] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz???

2015-10-12

[19:32:52] manfrin_: has joined #RubyOnRails
[19:41:24] manfrin_: Ping timeout: 252 seconds

2015-10-09

[22:45:58] manfrin_: has joined #RubyOnRails
[23:13:31] manfrin_: Ping timeout: 268 seconds

2015-10-08

[02:03:37] manfrin_: Quit: My Mac has gone to sleep. ZZZzzz???

2015-10-07

[17:53:21] manfrin_: has joined #RubyOnRails
[20:42:44] manfrin_: Quit: Textual IRC Client: www.textualapp.com
[20:46:46] manfrin_: has joined #RubyOnRails
[21:43:54] manfrin_: Ping timeout: 250 seconds
[21:46:03] manfrin_: has joined #RubyOnRails