clandry94

Activity Graph

Page 1 of 1

2016-07-29

[16:48:10] clandry94: has joined #RubyOnRails
[16:48:14] clandry94: has joined #ruby
[21:02:05] clandry94: Quit: Leaving

2016-07-22

[19:57:04] clandry94: Hi, I have a custom class under my app folder that I would like to access the current users cookies at. Currently, I get an undefined method cookies error. Is there something I need to include in my class in order to access them?
[21:18:24] clandry94: Quit: Leaving

2016-07-19

[15:02:44] clandry94: Read error: Connection reset by peer
[15:03:00] clandry94: has joined #RubyOnRails
[16:01:59] clandry94: Ping timeout: 258 seconds
[16:02:39] clandry94: has joined #RubyOnRails

2016-07-18

[15:08:00] clandry94: has joined #RubyOnRails
[15:10:18] clandry94: Client Quit
[15:10:40] clandry94: has joined #RubyOnRails

2016-07-15

[20:29:16] clandry94: Read error: Connection reset by peer
[20:33:18] clandry94: has joined #RubyOnRails
[22:05:57] clandry94: Read error: Connection reset by peer

2016-07-13

[15:18:34] clandry94: Read error: Connection reset by peer
[20:57:16] clandry94: has joined #RubyOnRails
[21:21:20] clandry94: Hi all, is there a way I can access service objects from an observer?
[21:22:33] clandry94: @fox_mulder_cp Check out https://blog.engineyard.com/2014/keeping-your-rails-controllers-dry-with-services for service objects
[21:22:45] clandry94: observers watch models and perform actions depending on the callback

2016-07-12

[20:03:52] clandry94: Read error: Connection reset by peer
[20:04:27] clandry94: has joined #RubyOnRails
[20:36:30] clandry94: Ping timeout: 276 seconds
[20:42:30] clandry94: has joined #RubyOnRails

2016-07-11

[17:18:13] clandry94: has joined #RubyOnRails
[18:19:52] clandry94: Hi, I'm having some confusion with activerecord joins. I'm trying to do something similar to this: Project.join('components.name', 'projects.name').joins(:components)
[18:20:01] clandry94: however, the output only has one column named name
[18:20:12] clandry94: is there an issue doing a join when both columns have the same name?
[18:21:05] clandry94: doing the equivalent method through an SQL fragment produces the same result
[18:23:40] clandry94: Component has a foreign key of project_id and there is a relation in activerecord of belongs to and has many between projects and components
[18:24:04] clandry94: My end result is that I want to have the project and components name in the same outputted table
[18:25:29] clandry94: oh wait, that join should be a 'select' in my query
[18:25:32] clandry94: Project.select('components.name', 'projects.name').joins(:components)
[18:28:50] clandry94: @tfitts I just found pluck as well, going to try that now. This is on MySQL
[18:31:52] clandry94: @tfitts that concat worked somewhat, I think I can go from there. Thanks for the help!

2016-06-30

[09:43:31] clandry94: Read error: Connection reset by peer
[09:43:58] clandry94: has joined #RubyOnRails
[22:21:26] clandry94: Quit: Leaving

2016-06-28

[15:01:59] clandry94: Read error: Connection reset by peer
[15:02:25] clandry94: has joined #RubyOnRails
[15:05:09] clandry94: Read error: Connection reset by peer
[15:05:22] clandry94: has joined #RubyOnRails
[16:00:26] clandry94: Ping timeout: 258 seconds
[16:01:21] clandry94: has joined #RubyOnRails
[16:08:00] clandry94: Read error: Connection reset by peer
[16:08:23] clandry94: has joined #RubyOnRails

2016-06-27

[14:22:43] clandry94: has joined #RubyOnRails
[16:01:49] clandry94: Ping timeout: 250 seconds
[16:02:43] clandry94: has joined #RubyOnRails
[17:02:18] clandry94: Read error: Connection reset by peer
[17:03:08] clandry94: has joined #RubyOnRails

2016-06-24

[15:41:23] clandry94: has joined #RubyOnRails
[22:14:33] clandry94: Ping timeout: 244 seconds

2016-06-13

[14:15:28] clandry94: has joined #RubyOnRails
[21:55:05] clandry94: Read error: Connection reset by peer
[21:55:53] clandry94: has joined #RubyOnRails
[22:03:16] clandry94: Ping timeout: 252 seconds
[22:04:07] clandry94: has joined #RubyOnRails
[22:35:05] clandry94: Ping timeout: 244 seconds

2016-06-11

[08:36:22] clandry94: Read error: Connection reset by peer
[17:54:26] clandry94: has joined #RubyOnRails
[19:51:25] clandry94: Read error: Connection reset by peer

2016-06-09

[14:47:47] clandry94: Looking for a good resource or some tips: I have an admin panel in my Rails app. The admin panel was only available to the super admin, but now there is a new normal admin role. The normal admin will need access to an admin panel as well. What is the best practice: a) new view just for the new admin, or b) render different things on the existing view depending on which type of admin is accessing the page?
[14:50:27] clandry94: Thanks, that was where I was leaning
[14:50:49] clandry94: I suppose that follows DRY

2016-06-08

[14:19:09] clandry94: has joined #RubyOnRails
[14:23:57] clandry94: Ping timeout: 260 seconds
[14:24:40] clandry94: has joined #RubyOnRails

2016-06-07

[15:02:55] clandry94: Read error: Connection reset by peer
[15:03:47] clandry94: has joined #RubyOnRails
[22:36:47] clandry94: Ping timeout: 258 seconds

2016-06-06

[14:16:27] clandry94: Read error: Connection reset by peer
[17:49:08] clandry94: has joined #RubyOnRails

2016-06-02

[19:17:41] clandry94: has joined #RubyOnRails
[19:20:17] clandry94: If I need to know current user information for a validation, should that validation be in the model or the controller? I have the custom validation in the model currently, but I'm having trouble getting the current user information because session info usually isn't available at that level.
[19:21:41] clandry94: validation, When users are logged in they have a role and certain roles can change values in a table only to other certain values depending on their role
[19:22:22] clandry94: e.g. someone with a 'developer' role could change state_id in a model from 0 to 1, but not from 1 to 2
[19:23:26] clandry94: Okay, thank you. I thought I was going down the wrong path. Where do I handle authorizations, the controller?

2016-05-31

[14:20:11] clandry94: has joined #RubyOnRails
[20:50:02] clandry94: Read error: Connection reset by peer

2016-05-27

[09:51:56] clandry94: Read error: Connection reset by peer
[09:52:16] clandry94: has joined #RubyOnRails
[13:07:48] clandry94: Ping timeout: 276 seconds
[14:15:47] clandry94: has joined #RubyOnRails
[17:17:45] clandry94: Ping timeout: 258 seconds
[18:08:18] clandry94: has joined #RubyOnRails
[21:04:00] clandry94: Read error: Connection reset by peer

2016-05-25

[14:42:22] clandry94: Is application.rb loaded whenever a rake task is run?
[14:46:16] clandry94: I'm asking because whenever I encountered some behavior I haven't come across before. I put a 'puts' in my application.rb within the Application class and created a basic rake task. Whenever I call rake something:easytask, whatever I have in the application class in application.rb is outputted
[14:47:28] clandry94: Okay, one moment
[14:54:21] clandry94: @sevenseacat https://gist.github.com/anonymous/387fc0b01c3120cb882041a92e7f802b
[14:55:03] clandry94: Let me know if you need anymore information
[14:58:36] clandry94: Interesting..
[14:59:31] clandry94: Is there a reason why it's required?
[19:52:06] clandry94: @am55 The local username/pass probably won't be the same on the deploy server as your local dev machine

2016-05-24

[16:46:06] clandry94: has joined #RubyOnRails
[22:00:57] clandry94: @istrasci There is an rspec O'Reilly book that is very good

2016-05-23

[14:46:54] clandry94: has joined #RubyOnRails
[14:55:53] clandry94: What's the best way to handle versioning in rails projects using git tags? I've read of using a rake task. Any differing ideas?
[14:57:17] clandry94: We're using git tag currently, but want to automate the tagging in our CI system
[15:01:39] clandry94: I'm not stuck on anything, currently. This gem describes what i'm doing https://github.com/nilbus/rails-app-versioning, but I wanted to see if the community had any better methods
[15:01:47] clandry94: before I use this gem
[15:03:04] clandry94: Also the gem is lacking in features a bit with no error checking
[23:01:19] clandry94: Read error: Connection reset by peer

2016-05-20

[14:17:19] clandry94: has joined #RubyOnRails
[17:58:48] clandry94: Read error: Connection reset by peer
[17:59:13] clandry94: has joined #RubyOnRails
[18:45:12] clandry94: Ping timeout: 246 seconds
[19:14:39] clandry94: has joined #RubyOnRails
[19:26:27] clandry94: Read error: Connection reset by peer
[19:26:56] clandry94: has joined #RubyOnRails
[20:24:47] clandry94: Read error: Connection reset by peer

2016-05-19

[20:58:19] clandry94: has joined #RubyOnRails
[22:32:15] clandry94: Ping timeout: 276 seconds