n1ck7

Activity Graph

Page 1 of 1

2015-11-20

[09:44:55] n1ck7: has joined #RubyOnRails
[16:47:17] n1ck7: Ping timeout: 265 seconds
[17:55:58] n1ck7: has joined #RubyOnRails
[21:31:23] n1ck7: Ping timeout: 264 seconds

2015-11-19

[10:31:27] n1ck7: has joined #RubyOnRails
[10:50:25] n1ck7: Ping timeout: 244 seconds
[11:18:49] n1ck7: has joined #RubyOnRails
[15:13:04] n1ck7: Read error: Connection reset by peer
[15:16:02] n1ck7: has joined #RubyOnRails
[15:20:56] n1ck7: Remote host closed the connection
[15:21:32] n1ck7: has joined #RubyOnRails
[16:11:39] n1ck7: Ping timeout: 255 seconds
[16:16:00] n1ck7: has joined #RubyOnRails
[16:22:54] n1ck7: Ping timeout: 255 seconds
[16:49:56] n1ck7: has joined #RubyOnRails
[17:02:56] n1ck7: Ping timeout: 244 seconds
[17:10:00] n1ck7: has joined #RubyOnRails
[18:11:27] n1ck7: Ping timeout: 260 seconds

2015-11-18

[12:46:01] n1ck7: has joined #RubyOnRails
[14:20:53] n1ck7: Ping timeout: 252 seconds
[14:29:39] n1ck7: has joined #RubyOnRails
[18:22:59] n1ck7: Read error: Connection reset by peer

2015-11-17

[01:59:29] n1ck7: Quit: Leaving
[10:42:26] n1ck7: has joined #RubyOnRails
[11:15:23] n1ck7: Ping timeout: 260 seconds
[11:35:08] n1ck7: has joined #RubyOnRails
[13:39:14] n1ck7: Ping timeout: 260 seconds
[13:51:37] n1ck7: has joined #RubyOnRails
[15:38:21] n1ck7: Ping timeout: 255 seconds
[15:51:40] n1ck7: has joined #RubyOnRails
[19:12:05] n1ck7: Read error: No route to host

2015-11-16

[10:26:57] n1ck7: has joined #RubyOnRails

2015-11-15

[13:05:06] n1ck7: Quit: Leaving

2015-11-14

[13:24:33] n1ck7: has joined #RubyOnRails
[16:30:35] n1ck7: Ping timeout: 240 seconds
[19:19:20] n1ck7: has joined #RubyOnRails

2015-11-13

[11:03:46] n1ck7: has joined #RubyOnRails
[18:09:28] n1ck7: Quit: Leaving

2015-11-12

[01:22:38] n1ck7: Ping timeout: 260 seconds
[11:21:59] n1ck7: has joined #RubyOnRails
[12:49:10] n1ck7: I've namespaced a model "Wills" to "Classic::Wills", is there any way of using a namespace with a different reference? in PHP you could do something like "Use Classic\Wills as Wills"
[12:50:52] n1ck7: rvanlieshout, I'm refactoring an application, have renamed the model, but there's loads of references to the old model name inside of the controller, I'm gona be doing this for many models and controllers so I thought it might be a good idea
[12:53:16] n1ck7: djellemah, rvanlieshout Thanks for helping and your advice
[15:07:21] n1ck7: Read error: Connection reset by peer
[15:07:53] n1ck7: has joined #RubyOnRails
[18:44:30] n1ck7: Quit: Leaving

2015-11-11

[01:53:00] n1ck7: Ping timeout: 265 seconds
[11:34:27] n1ck7: has joined #RubyOnRails
[13:41:26] n1ck7: When specifying a layout for a controller, is it possible to have it be relative to a sub directory of views? (not the layouts folder itself) At the moment rails looks in views/layouts - but I've moved all my layouts to views/classic/layouts
[13:42:05] n1ck7: How can I tell the layout method to look inside of classics?
[13:49:47] n1ck7: goldbug, Thanks for the suggestion, I want to apply this to the entire controller though with the "layout" method. Any idea how to do it through this?
[17:06:20] n1ck7: Ping timeout: 276 seconds
[21:44:05] n1ck7: has joined #RubyOnRails

2015-11-10

[14:00:13] n1ck7: has joined #RubyOnRails
[14:54:54] n1ck7: Ping timeout: 272 seconds
[14:55:37] n1ck7: has joined #RubyOnRails
[20:49:01] n1ck7: Is it possible to have 2 different directories for controllers/models etc in Rails? I have a legacy app and I want to move the current contents of the app folder into "classic" and have any URL that is namespaced with "classic" use this folder? is it possible?
[20:51:29] n1ck7: smathy, helpa I've been researching this for hours, all I wanted to know is if someone knew if it's possible to do in Rails
[20:52:21] n1ck7: smathy, helpa What's the purpose of this IRC chat if people can't ask questions like this?
[20:55:02] n1ck7: rhizome, What would you suggest?
[21:49:55] n1ck7: I've added a path scope to all of my routes - "path => 'classic'" so everything is accessed like localhost/classic/foo is there any way that I can move everything inside the app directory into a sub folder of app - "app/classic" and have it still route correctly?
[22:12:45] n1ck7: When routing to a controller, does Rails specifically look in the app/controllers folder? I've added some controllers into an app/classic/controllers directory, but they aren't picked up
[22:14:45] n1ck7: Radar, thanks for the reply. Is there any way to alter this behaviour? I want rails to use the app/controllers directory for regular routes. But any routes that have a namespace of "classic" - use the controllers that are inside of app/classic/controllers
[22:15:50] n1ck7: Radar, Sorry - it's actually "scope(:path => '/classic')"
[22:16:46] n1ck7: Radar, I want to actually move all sub directories of app (controllers, models, views etc) into this "app/classic" directory
[22:17:32] n1ck7: Radar, And have rails use this folder for any routes that prefix with "classic", but otherwise route as normal
[22:18:18] n1ck7: defsdoor, Yeah, they probably would. I've inherited an old application, and I want to re-write it, so I want to temporarily move all of this stuff into a seperate folder
[22:20:23] n1ck7: matthewd, Yeah, that's what I want to do
[22:24:08] n1ck7: matthewd, So you don't think it can be done? These are instructions that have been handed down to me in terms of how they want to go about re-writing this app. Do you have any suggestions as to how we could go about gradually re-factoring everything inside of app
[22:29:14] n1ck7: matthewd, They were quite specific about having everything that currently exists in the app folder into "app/classic" And from there, whenever a url is prefixed with "classic" - make sure it uses the controllers, models, views inside of "app/classic"
[22:29:41] n1ck7: matthewd, Hope that makes sense
[22:31:41] n1ck7: matthewd, Experienced Rails Developers yeah
[22:34:00] n1ck7: sure there is a sensible way to do it so I'll leave it with you to come
[22:34:00] n1ck7: ('classic'). I'm not 100% sure on how Rails will handle this but I'm
[22:34:00] n1ck7: look when the namespace in the URL matches this new namespace
[22:34:00] n1ck7: controllers) into a sub-directory and make sure Rails knows where to
[22:34:00] n1ck7: matthewd, Right okay, I'll copy and paste the exact wording that I have in an email here and maybe it will make a bit more sense: "To do this, we'll need to move everything (models, views and
[22:34:01] n1ck7: up with a sensible solution"
[22:36:03] n1ck7: subdirectory ('classic')."
[22:36:03] n1ck7: matthewd, Ah I emailed back clarifying everything and his exact words ""Yeah, that's right ? everything inside app/ will need putting into a
[22:36:53] n1ck7: matthewd, So you don't think it's something that is possible to do in Rails? I've been trying to figure this out all day and haven't come across any solution for it either
[22:38:07] n1ck7: matthewd, Ok mate, thanks for your help

2015-11-09

[16:01:35] n1ck7: has joined #RubyOnRails
[17:22:12] n1ck7: Ping timeout: 246 seconds

2015-11-05

[13:29:49] n1ck7: Read error: No route to host
[13:51:20] n1ck7: has joined #RubyOnRails
[15:40:13] n1ck7: Read error: No route to host

2015-11-04

[10:56:20] n1ck7: has joined #RubyOnRails
[11:05:50] n1ck7: Ping timeout: 250 seconds
[15:59:13] n1ck7: has joined #RubyOnRails

2015-11-03

[13:24:58] n1ck7: has joined #RubyOnRails
[13:27:10] n1ck7: Anyone know how I can access a models relationship within a form collection_select?
[13:27:57] n1ck7: f.collection_select(:followedtopic_id, FollowedTopic.order(:id),:id, :id) <- How can I replace that last :id symbol with the belongs_to Topic relationship, so it says topic.title
[13:33:12] n1ck7: Cork, thanks for the reply. I just tried that and it's giving me an undefined method of map error..
[13:34:29] n1ck7: Cork, rails 4.1.2, ruby 2.1.5
[13:38:38] n1ck7: rvanlieshout, I'll have a look into delegate, thanks.
[13:39:14] n1ck7: Cork, I tried what you suggested and it's giving me an undefined method for title
[13:40:30] n1ck7: Cork, Yeah it is
[13:40:39] n1ck7: Cork, belongs_to :topic
[19:29:41] n1ck7: Ping timeout: 244 seconds

2015-11-02

[01:16:28] n1ck7: Ping timeout: 244 seconds
[11:57:56] n1ck7: has joined #RubyOnRails
[18:10:23] n1ck7: Ping timeout: 264 seconds
[19:50:20] n1ck7: has joined #RubyOnRails
[22:49:13] n1ck7: Ping timeout: 252 seconds

2015-11-01

[23:25:38] n1ck7: has joined #RubyOnRails

2015-10-31

[00:04:27] n1ck7: Ping timeout: 265 seconds
[12:52:40] n1ck7: has joined #RubyOnRails
[14:10:59] n1ck7: Ping timeout: 264 seconds
[18:39:22] n1ck7: has joined #RubyOnRails
[18:39:47] n1ck7: Client Quit

2015-10-30

[10:34:21] n1ck7: has joined #RubyOnRails
[11:37:45] n1ck7: Ping timeout: 250 seconds
[11:50:51] n1ck7: has joined #RubyOnRails
[12:01:54] n1ck7: Ping timeout: 250 seconds
[12:17:02] n1ck7: has joined #RubyOnRails
[12:56:48] n1ck7: Ping timeout: 255 seconds
[13:15:47] n1ck7: has joined #RubyOnRails
[15:26:01] n1ck7: Ping timeout: 244 seconds
[15:38:12] n1ck7: has joined #RubyOnRails

2015-10-29

[13:11:32] n1ck7: If I want to show content specific to a user, what would be the best construction of routing. user/{id}/topics, or topics/user/{id}?
[13:13:08] n1ck7: rvanlieshout, Okay thanks, so it's definitely more appropriate to do this inside of the users_controller instead of the topics_controller?
[13:14:31] n1ck7: rvanlieshout, Ah! thank you
[16:36:46] n1ck7: Ping timeout: 246 seconds
[16:47:17] n1ck7: has joined #RubyOnRails
[17:50:30] n1ck7: Ping timeout: 265 seconds
[19:09:39] n1ck7: has joined #RubyOnRails
[19:19:10] n1ck7: Ping timeout: 250 seconds
[19:32:29] n1ck7: has joined #RubyOnRails
[20:41:50] n1ck7: Ping timeout: 260 seconds

2015-10-28

[09:14:19] n1ck7: Ping timeout: 240 seconds
[09:15:39] n1ck7: has joined #RubyOnRails
[09:41:42] n1ck7: Ping timeout: 260 seconds
[09:51:44] n1ck7: has joined #RubyOnRails
[13:36:52] n1ck7: Ping timeout: 250 seconds
[13:39:35] n1ck7: has joined #RubyOnRails
[13:50:21] n1ck7: Ping timeout: 255 seconds
[13:58:34] n1ck7: has joined #RubyOnRails
[14:02:50] n1ck7: Ping timeout: 240 seconds
[14:20:02] n1ck7: has joined #RubyOnRails

2015-10-27

[02:00:31] n1ck7: Ping timeout: 260 seconds
[09:32:19] n1ck7: has joined #RubyOnRails
[10:42:15] n1ck7: Ping timeout: 255 seconds
[10:55:40] n1ck7: has joined #RubyOnRails
[11:44:31] n1ck7: Ping timeout: 244 seconds
[11:45:46] n1ck7: has joined #RubyOnRails
[13:27:58] n1ck7: Ping timeout: 246 seconds
[14:52:18] n1ck7: has joined #RubyOnRails
[16:01:46] n1ck7: Ping timeout: 272 seconds
[16:13:55] n1ck7: has joined #RubyOnRails
[16:39:46] n1ck7: Ping timeout: 272 seconds
[16:55:24] n1ck7: has joined #RubyOnRails
[22:18:45] n1ck7: Ping timeout: 250 seconds
[23:04:20] n1ck7: has joined #RubyOnRails

2015-10-26

[03:32:19] n1ck7: Ping timeout: 260 seconds
[09:32:13] n1ck7: has joined #RubyOnRails
[10:06:32] n1ck7: Read error: No route to host
[10:09:17] n1ck7: has joined #RubyOnRails
[10:15:15] n1ck7: Ping timeout: 255 seconds
[10:39:40] n1ck7: has joined #RubyOnRails
[15:45:08] n1ck7: Quit: Leaving
[15:45:15] n1ck7: has joined #RubyOnRails
[17:16:26] n1ck7: Ping timeout: 260 seconds
[17:23:35] n1ck7: has joined #RubyOnRails
[19:23:10] n1ck7: Ping timeout: 250 seconds
[20:37:34] n1ck7: has joined #RubyOnRails

2015-10-25

[21:05:11] n1ck7: has joined #RubyOnRails
[21:10:16] n1ck7: Quit: Leaving
[21:12:27] n1ck7: has joined #RubyOnRails
[21:48:30] n1ck7: Ping timeout: 260 seconds
[21:50:33] n1ck7: has joined #RubyOnRails

2015-10-20

[07:53:22] n1ck7: has joined #RubyOnRails
[08:08:42] n1ck7: Ping timeout: 260 seconds
[09:04:50] n1ck7: has joined #RubyOnRails
[09:09:58] n1ck7: Ping timeout: 272 seconds
[09:33:35] n1ck7: has joined #RubyOnRails
[11:58:32] n1ck7: Ping timeout: 265 seconds
[12:47:22] n1ck7: has joined #RubyOnRails
[12:55:21] n1ck7: Quit: Leaving

2015-10-19

[14:07:12] n1ck7: has joined #RubyOnRails
[14:31:35] n1ck7: Ping timeout: 256 seconds
[14:56:47] n1ck7: has joined #RubyOnRails
[18:00:23] n1ck7: has left #RubyOnRails: ()
[18:01:03] n1ck7: has joined #RubyOnRails
[18:01:22] n1ck7: How exactly does "accepts_nested_attributes_for" work in Rails? For example, if I have a "followed_topic" model which belongs to, and accepts attributes for "topic", how can I get the "followed_topic" model to save the topic data as well?
[18:20:31] n1ck7: Ping timeout: 265 seconds
[18:48:11] n1ck7: has joined #RubyOnRails
[21:15:45] n1ck7: Ping timeout: 250 seconds

2015-10-18

[09:22:37] n1ck7: has joined #RubyOnRails
[12:07:32] n1ck7: Ping timeout: 272 seconds
[12:24:20] n1ck7: has joined #RubyOnRails
[12:34:23] n1ck7: Ping timeout: 256 seconds
[12:46:15] n1ck7: has joined #RubyOnRails
[13:02:27] n1ck7: Ping timeout: 260 seconds
[13:42:32] n1ck7: has joined #RubyOnRails
[14:16:45] n1ck7: Ping timeout: 250 seconds
[14:31:46] n1ck7: has joined #RubyOnRails
[17:00:55] n1ck7: Ping timeout: 252 seconds
[19:50:14] n1ck7: has joined #RubyOnRails
[22:11:34] n1ck7: Ping timeout: 250 seconds

2015-10-17

[14:26:29] n1ck7: has joined #RubyOnRails
[16:04:50] n1ck7: Hi guys. what's the best way of submitting data from a form which requires the use of 2 different models? for example; I have 3 tables - users, topics, and followed_topics. When a user submits the name of a topic they want to follow, I want to get the topic's id if it exists, otherwise create it. Would it be appropriate to do this inside of the followed_topics controller?
[16:05:24] n1ck7: even though there is a seperate resource for topics
[16:06:06] n1ck7: Ah, okay, there is an association between them, How do nested forms work?
[16:06:40] n1ck7: Okay :) thanks
[16:06:55] n1ck7: How do I do that? I've never done it before
[16:12:27] n1ck7: https://gist.github.com/nickshears/e09c4ff78c5f1b8ba7d7
[16:12:51] n1ck7: The form as well?
[16:15:36] n1ck7: Added the form :)
[16:16:50] n1ck7: Yeah, and the followed_topics table stores a topic_id
[16:19:43] n1ck7: Ah, because the topics only ever get added when the user submits a new one which they want to add/follow. There will end up being thousands of potential topics
[16:20:15] n1ck7: Yeah, potentially, if the topic doesn't already exist
[16:22:22] n1ck7: Ahh, that sounds like what I need
[16:22:39] n1ck7: Yeah, there is a simple resource for topics with a form
[16:29:49] n1ck7: renegadeandy: I'm a little bit stuck with how to create the form. Should I still be using the syntax of "form_for @followed_topic"
[16:35:44] n1ck7: Okay thanks, I'm gonna try it out. The syntax is kind of strange having the form for @user. Would this all be easier to simply validate/insert to the Topic model from the followed_topics#create method? or is nested forms the more appropriate solution?
[18:40:39] n1ck7: Ping timeout: 260 seconds
[18:52:47] n1ck7: has joined #RubyOnRails
[19:02:23] n1ck7: Ping timeout: 252 seconds