« Back to channel list

#RubyOnRails - 11 July 2018

« Back 1 day Forward 1 day »
[00:06:00] Guest84006: has joined #RubyOnRails
[00:06:53] pharma_joe: has joined #RubyOnRails
[00:13:44] unreal: has joined #RubyOnRails
[00:14:10] garyserj: has joined #RubyOnRails
[00:16:16] Guest84006: has joined #RubyOnRails
[00:16:50] cheater: havenwood: thanks!
[00:16:53] cheater: has left #RubyOnRails: ()
[00:17:44] garyserj: in rails, should one be able to see an instance variable in one method when it was created in another method?
[00:17:57] garyserj: i know one can in ruby normally but for some reason i can't see it in rails
[00:20:30] Puffball: has joined #RubyOnRails
[00:25:48] jhack_: has joined #RubyOnRails
[00:26:22] garyserj: here is my code https://paste.ee/p/yCSrc
[00:26:29] Guest84006: has joined #RubyOnRails
[00:26:46] garyserj: I go to /qqq then /rrr I expect XaaaX but I get XX
[00:27:10] tdy: has joined #RubyOnRails
[00:28:19] jhack_: has joined #RubyOnRails
[00:36:44] Guest84006: has joined #RubyOnRails
[00:37:16] spectra: has joined #RubyOnRails
[00:45:53] Puffball: has joined #RubyOnRails
[00:47:00] Guest84006: has joined #RubyOnRails
[00:47:44] srruby: has joined #RubyOnRails
[00:49:45] fugee: has joined #RubyOnRails
[00:49:52] fugee: i can't get elasticsearch to run on ubuntu 18.04 it says There is insufficient memory for the Java Runtime Environment to continue
[00:57:18] Guest84006: has joined #RubyOnRails
[00:58:22] Puffball: has joined #RubyOnRails
[01:01:00] sevenseacat: has joined #RubyOnRails
[01:04:47] fugee: has left #RubyOnRails: ("Leaving")
[01:07:22] Guest84006: has joined #RubyOnRails
[01:07:56] Tempesta: has joined #RubyOnRails
[01:10:39] alfiemax: has joined #RubyOnRails
[01:13:26] Fridtjof: has joined #RubyOnRails
[01:16:08] mices: has joined #RubyOnRails
[01:17:35] Guest84006: has joined #RubyOnRails
[01:24:42] psSch: has joined #RubyOnRails
[01:26:12] psSch: Is there a way that I can query multiple tables for their most recent? Sort of like (ModelA, ModelB).last(order: :updated_at, limit: 10) ?
[01:26:40] psSch: That's a made-up syntax of course, but it gets across what I'm looking for I hope.
[01:27:54] Guest84006: has joined #RubyOnRails
[01:38:05] Guest84006: has joined #RubyOnRails
[01:43:05] fryguy: [ModelA, ModelB].map {|m| m.last(order: :updated_at, limit: 10)}.sort_by(:updated_at).take(10)
[01:48:19] Guest84006: has joined #RubyOnRails
[01:51:55] jhack: has joined #RubyOnRails
[01:58:34] Guest84006: has joined #RubyOnRails
[02:08:48] Guest84006: has joined #RubyOnRails
[02:19:04] Guest84006: has joined #RubyOnRails
[02:25:30] Joufflu: has joined #RubyOnRails
[02:29:16] Guest84006: has joined #RubyOnRails
[02:30:28] hfp_work: has joined #RubyOnRails
[02:30:41] dblessing: has joined #RubyOnRails
[02:34:13] andrewray: has joined #RubyOnRails
[02:39:29] Guest84006: has joined #RubyOnRails
[02:45:57] andrewray: I like ruby because it's literally impossible to tell if a variable, method, module, or class, is defined until your program executes. it's exciting
[02:46:07] andrewray: *and* it depends on the order! your program executes in
[02:46:37] andrewray: I think(?) it's the only dynamic language that has this excitement. every other dynamic language i've wored in has a static analysis tool that can determine if a variable is defined before the program executes
[02:49:44] Guest84006: has joined #RubyOnRails
[02:55:12] andrewray: I can't begin to describe how happy I am knowing that things like these are core rails RUNTIME errors https://github.com/rails/rails/blob/9480618f06ada9e06e8c95ca85d6242debad693a/activesupport/lib/active_support/dependencies.rb#L491 that are almost undebuggable
[02:56:13] andrewray: it's cool that ruby is so flexible and core designed to elude static analysis, and the book Eloquent Ruby has three chapters on how to use "method_missing?" making it impossible to remotely know if your program is correct until execution
[02:56:19] sevenseacat: I see that error every now and then
[02:56:34] sevenseacat: but this seems like the wrong forum for this kind of ranting
[02:56:47] andrewray: I really enjoy renaming a method in a module having no idea if was ever called or will ever be called again, and having the definition of that method change based on the order in which people navigate my rails app
[02:57:17] andrewray: i like that I can't do explicit imports and everything is magically global in the current namespace, which is different than any other dynamic language
[02:57:17] sevenseacat: yes, ruby allows for massive footguns
[02:57:48] andrewray: I like that "fat models" is the "solution" to MVC
[02:57:51] sevenseacat: andrewray: if you have constructive Ruby feedback, take it to the appropriate forum. this is a rails channel.
[02:58:13] andrewray: sevenseacat: I don't think my opinion matters, I'm 15 years late to a party that won't change
[02:58:37] sevenseacat: for ruby stuff? possibly
[02:58:57] andrewray: that's not gonna stop me from ranting
[02:59:07] sevenseacat: here it will.
[02:59:52] fryguy: good thing there are lots of other languages that make a different set of tradeoffs that might be more appropriate for your needs and wants
[02:59:59] Guest84006: has joined #RubyOnRails
[03:03:54] alfiemax: has joined #RubyOnRails
[03:10:10] Guest84006: has joined #RubyOnRails
[03:11:43] braincrash: has joined #RubyOnRails
[03:17:18] andrewray: it is, I just wish companies I liked didn't turn to rails first because of the speed of early development and lock in to all of these problems
[03:17:50] sevenseacat: thats starting to shift now I think
[03:19:10] akaiiro: has joined #RubyOnRails
[03:20:25] Guest84006: has joined #RubyOnRails
[03:22:10] andrewray: I wish rails wasn't built on memorizing conventions when all I want is a function that takes regular arguments
[03:29:43] cjohnson: If you want runtime safety, why are you using a language like ruby in the first place?
[03:30:35] Guest84006: has joined #RubyOnRails
[03:31:11] andrewray: some places I want to work are locked in to it
[03:31:49] andrewray: I wish we would recognize basecamp isn't a good example of a monolith, and stop using it as an exemplary rails application
[03:36:02] andrewray: I don't get how sorbet can add static type checking to a langauge where even class definitions are runtime Class.new
[03:40:48] Guest84006: has joined #RubyOnRails
[03:47:16] cjohnson: It's probably not proper typing
[03:47:27] cjohnson: in the same way that typescript doesn't actually give you strong typing
[03:47:32] cjohnson: it's just a fancy linter
[03:48:08] cjohnson: Anyway IMO it's not about the tool it's about the work and the environment. Seems so odd to get so emotional about how exactly the language works. If the place seems nice to work, just work there, and learn the tool
[03:48:19] cjohnson: Chances are you will discover some things about it you like
[03:51:00] Guest84006: has joined #RubyOnRails
[03:56:40] srinidhi: has joined #RubyOnRails
[04:01:17] Guest84006: has joined #RubyOnRails
[04:09:15] Fridtjof: has joined #RubyOnRails
[04:11:30] Guest84006: has joined #RubyOnRails
[04:19:18] dblessing: has joined #RubyOnRails
[04:19:55] Saukk: has joined #RubyOnRails
[04:21:44] Guest84006: has joined #RubyOnRails
[04:31:56] Guest84006: has joined #RubyOnRails
[04:42:12] Guest84006: has joined #RubyOnRails
[04:52:37] Guest84006: has joined #RubyOnRails
[04:58:01] ur5us: has joined #RubyOnRails
[05:02:47] Guest84006: has joined #RubyOnRails
[05:13:02] Guest84006: has joined #RubyOnRails
[05:22:16] vedu_: has joined #RubyOnRails
[05:23:13] Guest84006: has joined #RubyOnRails
[05:24:58] Technodrome: has joined #RubyOnRails
[05:32:23] pharma_joe: has joined #RubyOnRails
[05:33:29] Guest84006: has joined #RubyOnRails
[05:34:47] vedu_: has joined #RubyOnRails
[05:43:44] Guest84006: has joined #RubyOnRails
[05:46:38] havenwood: has joined #RubyOnRails
[05:48:22] za1b1tsu: has joined #RubyOnRails
[05:53:47] reber: has joined #RubyOnRails
[05:53:54] Guest84006: has joined #RubyOnRails
[05:54:58] TvL2386: has joined #RubyOnRails
[06:12:19] srinidhi: has joined #RubyOnRails
[06:14:07] vedu_: has joined #RubyOnRails
[06:14:37] Guest84006: has joined #RubyOnRails
[06:22:57] srinidhi: has joined #RubyOnRails
[06:24:37] Guest84006: has joined #RubyOnRails
[06:32:07] ariejan: has joined #RubyOnRails
[06:34:52] pharma_joe: has joined #RubyOnRails
[06:34:52] Guest84006: has joined #RubyOnRails
[06:45:10] Guest84006: has joined #RubyOnRails
[06:54:46] psychoslave: has joined #RubyOnRails
[06:55:22] Guest84006: has joined #RubyOnRails
[07:05:32] Guest84006: has joined #RubyOnRails
[07:07:58] conta: has joined #RubyOnRails
[07:11:46] dionysus69: has joined #RubyOnRails
[07:15:47] Guest84006: has joined #RubyOnRails
[07:26:03] Guest84006: has joined #RubyOnRails
[07:36:18] Guest84006: has joined #RubyOnRails
[07:42:07] mikecmpbll: has joined #RubyOnRails
[07:46:34] Guest84006: has joined #RubyOnRails
[07:50:54] mikecmpbll: has joined #RubyOnRails
[07:56:51] Guest84006: has joined #RubyOnRails
[08:07:03] Guest84006: has joined #RubyOnRails
[08:12:13] mtkd: has joined #RubyOnRails
[08:16:13] Guest84006: has joined #RubyOnRails
[08:16:21] ams__: has joined #RubyOnRails
[08:33:09] walidvb: has joined #RubyOnRails
[08:33:12] walidvb: hello all!
[08:33:29] walidvb: i have declared a module in app/lib/my_module.rb
[08:38:42] viatsko: has joined #RubyOnRails
[08:41:42] sevenseacat: good to know.
[08:47:52] walidvb: that module contains a sub module (so that module A; module B; end; end;)
[08:48:10] walidvb: I can call it fine when putting the file at the app/lib directory
[08:49:02] walidvb: but when i put it in a directory app/lib/my_module/my_module.rb, the submodule doesn't exist anymore
[08:49:49] sevenseacat: can we use real names instead of A, B, my_module ?
[08:49:57] walidvb: actually, it's as if the module isn't read (the module constant exists, but doesn't have any methods)
[08:50:24] walidvb: module is UnEpp, contains UnEpp::Domain (currently declared in the same file, trying to change that)
[08:50:45] sevenseacat: and what file is this in?
[08:54:39] walidvb: in app/lib/un_epp.rb
[08:54:58] walidvb: trying to move it to app/lib/un_epp/un_epp.rb and app/lib/un_epp/domain.rb
[08:55:06] walidvb: sry for the delay
[08:55:20] sevenseacat: app/lib/un_epp/domain.rb should work
[08:55:49] walidvb: this particular one i haven't tried, considering the app/lib/un_epp/un_epp.rb didn't work
[08:56:13] walidvb: should domain.rb's code be wrapped in module UnEpp, or is that magically added by the folder structure?
[08:56:30] sevenseacat: its not magically added, no
[08:57:27] walidvb: and what about the un_epp.rb file? how come the module exists, but has none of the methods i defined?
[08:58:13] sevenseacat: un_epp/un_epp.rb shouldnt exist
[08:58:34] vedu_: has joined #RubyOnRails
[08:59:06] walidvb: reason being?
[08:59:20] sevenseacat: you don't have an UnEpp::UnEpp class/module
[08:59:28] walidvb: UnEpp also has methods, where do i declare them?
[08:59:36] walidvb: in app/lib/un_epp.rb , then?
[08:59:37] sevenseacat: the path should match the class name
[08:59:57] walidvb: so a module should have its own file, and its submodule their own folder
[09:00:08] walidvb: thanks sevenseacat, always here to save the day :)
[09:18:43] ur5us: has joined #RubyOnRails
[09:27:52] ^mtkd: has joined #RubyOnRails
[09:28:41] vedu_: has joined #RubyOnRails
[09:31:09] Ergo: has joined #RubyOnRails
[09:35:50] samosaphile: has joined #RubyOnRails
[10:02:21] apeiros_: has joined #RubyOnRails
[10:15:15] samosaphile: has joined #RubyOnRails
[10:15:48] dionysus69: I am under DDOS attack!
[10:16:02] dionysus69: my sign in page is getting brute forced
[10:16:16] dionysus69: and I get lots of fatal errors ArgumentError (invalid byte sequence in UTF-8), probably password field contains some weird text
[10:16:40] dionysus69: any ideas how can I handle this fatal error?
[10:16:59] dionysus69: I am setting rate limiting on cloudflare to 10 requests per second, should I set it to 5?
[10:18:41] _aeris_: has joined #RubyOnRails
[10:29:53] Dbugger: has joined #RubyOnRails
[10:35:09] ur5us: has joined #RubyOnRails
[10:55:36] viatsko: has joined #RubyOnRails
[10:55:42] theRoUS: has left #RubyOnRails: ("Off to another part of the maze of twisty little passages")
[11:23:40] samosaphile: has joined #RubyOnRails
[11:25:36] jottr: has joined #RubyOnRails
[11:26:13] psychoslave: has joined #RubyOnRails
[11:50:38] vedu_: has joined #RubyOnRails
[11:56:47] apparition: has joined #RubyOnRails
[12:02:01] jottr: has joined #RubyOnRails
[12:02:30] dbugger_: has joined #RubyOnRails
[12:12:13] augcesar: has joined #RubyOnRails
[12:16:29] desperek: has joined #RubyOnRails
[12:23:24] nzst: has joined #RubyOnRails
[12:39:43] DrYockel: has joined #RubyOnRails
[12:44:39] srinidhi: has joined #RubyOnRails
[12:48:39] mtkd: has joined #RubyOnRails
[12:49:33] GodFather: has joined #RubyOnRails
[12:56:04] vedu_: has joined #RubyOnRails
[12:58:29] psychoslave: has joined #RubyOnRails
[12:58:45] srinidhi: has joined #RubyOnRails
[13:15:37] mikecmpb_: has joined #RubyOnRails
[13:30:00] Technodrome: has joined #RubyOnRails
[13:33:22] yehowyada: has joined #RubyOnRails
[13:33:57] GodFather: has joined #RubyOnRails
[13:42:56] uksio: has joined #RubyOnRails
[13:47:47] vedu_: has joined #RubyOnRails
[14:00:36] psychoslave: has joined #RubyOnRails
[14:01:14] Saukk: has joined #RubyOnRails
[14:08:37] GodFather: has joined #RubyOnRails
[14:23:53] dblessing: has joined #RubyOnRails
[14:25:27] dionysus69: has joined #RubyOnRails
[14:26:01] Sylario: I have a rspec test suite hanging at a Test
[14:26:05] dionysus69: is fail2ban go to solution against ddos / brute force on login forms?
[14:26:12] Sylario: Is there a way to identify it?
[14:28:12] Sylario: Ok i got it --format d
[14:37:49] nzst: has joined #RubyOnRails
[14:44:38] apeiros_: has joined #RubyOnRails
[14:53:57] mroutis: has joined #RubyOnRails
[14:56:48] apeiros_: has joined #RubyOnRails
[14:57:40] samosaphile: has joined #RubyOnRails
[15:01:01] alfiemax: has joined #RubyOnRails
[15:03:36] tdy: has joined #RubyOnRails
[15:05:36] DaveM: has joined #RubyOnRails
[15:05:51] enkeyz: has joined #RubyOnRails
[15:06:01] enkeyz: has left #RubyOnRails: ()
[15:08:11] Sylario: I have two tests that randomely hang in my test suite
[15:08:18] Sylario: I am not sure how to correct that
[15:14:38] troys: has joined #RubyOnRails
[15:15:27] Sylario: It seems to be related to the use of lock!
[15:18:01] yoones: has joined #RubyOnRails
[15:19:01] yoones: Question about omniauth: is there a way to ensure the provider's response authenticity? I'd like to make sure the response is not forged by the client himself
[15:21:52] Sylario: @yoones it's done when you use it against the provider
[15:23:54] Sylario: If the client forge something, his one time code will symply not work
[15:24:17] ^mtkd: has joined #RubyOnRails
[15:31:07] chouhoulis: has joined #RubyOnRails
[15:32:19] viatsko: has joined #RubyOnRails
[15:33:47] walidvb: has joined #RubyOnRails
[15:33:51] walidvb: hello again
[15:34:37] walidvb: i have a UnEpp module that makes calls to an external API. I'd like to stub/mock it in my rspec, so that whenever any call is made to it in my code, i control what the method returns
[15:35:11] walidvb: (in this case, i will want UnEpp.info to return a hard-coded copy of what the API actually returns)
[15:35:34] Tempesta: has joined #RubyOnRails
[15:36:57] walidvb: i can't find the right way to do this. most example let me check that my service got called with the right params
[15:37:09] walidvb: but i'd like that my service returns a certain answer, rather
[15:38:43] walidvb: i'm almost thinking of conditionally declaring my module (module UnEpp; if Rails.env.test?; fake_code; else; real_code; end;)
[15:38:52] walidvb: but there must be a better way to do that, no?
[15:39:51] yoones: allow(UnEpp).to receive(:info).and_return(whatever)
[15:40:03] walidvb: just that? :)
[15:40:11] yoones: In rspec, yes.
[15:40:41] walidvb: and i can put this in another file, and require it in my rspec?
[15:40:52] walidvb: or include it, rather
[15:40:59] yoones: usually you want to put this in a before block
[15:41:08] yoones: or in the it block if necessary
[15:41:36] walidvb: yes. so, have a UnEppMock module with a stub_all function, and include the module and run that function in a before block
[15:42:11] yoones: https://relishapp.com/rspec/rspec-mocks/v/2-99/docs/method-stubs
[15:42:20] yoones: the rest is up to you ;)
[15:43:04] walidvb: that's where i'm confused
[15:43:38] walidvb: all these show a call on an object that is declared there
[15:43:56] walidvb: in my case, it's a module that is called by my model, and i'm testing my model
[15:44:54] walidvb: except if i'd run UnEpp = double("UnEpp"), allow_and_stub, test my model
[15:44:56] karmine: has joined #RubyOnRails
[15:45:00] walidvb: maybe that'll work, will try
[15:45:02] walidvb: thx yoones
[15:45:14] psychoslave: has joined #RubyOnRails
[15:45:43] yoones: @walidvb https://pastebin.com/fff9QtvR
[15:46:05] walidvb: you're awesome
[15:46:09] cagomez: has joined #RubyOnRails
[15:48:53] walidvb: i guess where i'm stuck with my little ruby knowledge, is how do i declare these stubs outside of the spec file
[15:50:27] yoones: https://relishapp.com/rspec/rspec-core/docs/helper-methods/define-helper-methods-in-a-module
[15:50:33] karmine: hi all, there is a gem that allows me to have a Linux terminal on the web browser, I explain my needs, i should open an ssh connection through the web browser, the schema is browser --> server with rails --> another server, i need to execute some command by the browser in another server, thanks in advance
[15:52:12] walidvb: yoones: trying to do the opposite, to call `allow` in my helper
[15:52:44] walidvb: but for now i've passed `self` as an arg to UnEppMock.stub_all, that worked ;)
[15:52:52] walidvb: will find a better solution later
[15:53:59] ivanskie: has joined #RubyOnRails
[15:56:38] mtkd: has joined #RubyOnRails
[16:00:12] za1b1tsu: has joined #RubyOnRails
[16:04:48] tdy: has joined #RubyOnRails
[16:04:49] dviola: has joined #RubyOnRails
[16:05:40] IanMalcolm: has joined #RubyOnRails
[16:06:41] dblessing: has joined #RubyOnRails
[16:11:36] andrewray: has joined #RubyOnRails
[16:12:33] srinidhi: has joined #RubyOnRails
[16:14:10] IanMalcolm: has joined #RubyOnRails
[16:15:40] jcarl43: has joined #RubyOnRails
[16:16:29] DTZUZO: has joined #RubyOnRails
[16:18:56] vedu_: has joined #RubyOnRails
[16:26:03] TvL2386: has joined #RubyOnRails
[16:40:28] pavelz: has joined #RubyOnRails
[16:41:06] pavelz: hey, how come now User.none returns [] instead of relation ?
[16:46:25] eckhardt_: has joined #RubyOnRails
[16:48:15] molloy: pavelz: it's not returning #<ActiveRecord::Relation []> ?
[16:50:08] GodFather: has joined #RubyOnRails
[16:50:49] IanMalcolm: has joined #RubyOnRails
[16:54:40] jottr: has joined #RubyOnRails
[16:55:32] pavelz: no representation changed. grr
[16:55:51] pavelz: gives [] bit .class gives activrecrod
[16:57:53] dblessing: has joined #RubyOnRails
[16:58:20] Technodrome: has joined #RubyOnRails
[17:05:10] GodFather: has joined #RubyOnRails
[17:09:18] za1b1tsu: has joined #RubyOnRails
[17:13:11] andrewray: has joined #RubyOnRails
[17:17:26] andrewray: has joined #RubyOnRails
[17:18:06] andrewray: has joined #RubyOnRails
[17:19:01] andrewray: has joined #RubyOnRails
[17:19:46] andrewray: has joined #RubyOnRails
[17:24:30] chkhanch: has joined #RubyOnRails
[17:24:52] sameerynho: has joined #RubyOnRails
[17:25:29] chkhanch: hi2all, in rspec : expect(response).to redirect_to(groups_path(current_user.group_id)), have error: Expected "http://test.host/groups.1235" to be === "http://test.host/groups/1235"
[17:34:49] mtkd: has joined #RubyOnRails
[17:42:26] NoGodDamnIdea: has joined #RubyOnRails
[17:52:29] dionysus69: has joined #RubyOnRails
[17:55:07] desperek: has joined #RubyOnRails
[18:00:18] fmcgeough: has joined #RubyOnRails
[18:09:23] conta: has joined #RubyOnRails
[18:10:35] mtkd: has joined #RubyOnRails
[18:18:47] jackhum: has joined #RubyOnRails
[18:27:19] johndunn: has joined #RubyOnRails
[18:27:50] reber: has joined #RubyOnRails
[18:32:26] akaiiro: has joined #RubyOnRails
[18:41:29] catbusters: has joined #RubyOnRails
[18:46:48] Puffball: has joined #RubyOnRails
[18:55:41] jottr: has joined #RubyOnRails
[19:08:10] chkhanch: Where do I need to make changes and what to do to localize rails_admin ?
[19:08:26] beowuff: has joined #RubyOnRails
[19:34:12] jottr: has joined #RubyOnRails
[19:47:55] DylanJ: has joined #RubyOnRails
[20:11:37] MasterAsia: has joined #RubyOnRails
[20:11:52] MasterAsia: How can I determine if a record's created_at is more than a week ago?
[20:12:02] MasterAsia: record.created_at > 1.week.ago?
[20:12:42] MasterAsia: oh it is the other way
[20:12:45] MasterAsia: record.created_at < 1.week.ago?
[20:14:38] molloy: I just tested that in the rails console
[20:14:59] molloy: seems counterintuitive
[20:18:01] mtkd: has joined #RubyOnRails
[20:22:05] fragamus: has joined #RubyOnRails
[20:24:07] ellcs: has joined #RubyOnRails
[20:35:53] mroutis: has joined #RubyOnRails
[20:38:53] mtkd: has joined #RubyOnRails
[20:46:06] hahuang65: masterasia: that one is confusing because it's the phrasing of `1.week.ago`
[20:46:41] hahuang65: keep in mind that `1.week.ago` is a point in time that you're comparing against
[20:48:00] MasterAsia: yeah that's what threw me off
[20:48:04] hahuang65: when you read it, it reads "record created_at is greater than 1 week ago", but it really means "record created_at greater than hh:mm where hh:mm is 1 week ago"
[20:48:57] MasterAsia: and greater at in terms of date comparison
[20:49:02] MasterAsia: is pretty much future
[20:49:09] MasterAsia: and I want things happening before 1.week.ago
[20:49:19] MasterAsia: one of those things that you just have to think about for a minute
[20:50:07] hahuang65: it actually might be better to write it a little less concisely in this case
[20:50:24] hahuang65: record.created_at > (Date.today - 1.week)
[20:51:56] regedit: has joined #RubyOnRails
[20:56:23] tendencies: has joined #RubyOnRails
[21:03:53] mtkd: has joined #RubyOnRails
[21:14:38] dionysus69: has joined #RubyOnRails
[21:15:31] ur5us: has joined #RubyOnRails
[21:20:42] alfiemax: has joined #RubyOnRails
[21:27:01] agent_white: has joined #RubyOnRails
[21:39:04] ellcs: has joined #RubyOnRails
[21:58:30] dviola: has joined #RubyOnRails
[22:17:08] blackcross: I have an admin_controller def get_whitespace ( length) that returns a string with length # of spaces. I want to be able to call this inside of views/admin/index.html.erb : <%= get_whitespace ( 8 ) %>, but I receive an "NoMethodError in Admin#index" error, how should I call the get_whitespace or how do make it callable in the template?
[22:24:35] IanMalcolm: has joined #RubyOnRails
[22:29:43] mroutis: has joined #RubyOnRails
[22:39:49] pharma_joe: has joined #RubyOnRails
[22:42:58] hahuang65: blackcross: if you want to call it in a template, you should put it in a helper file.
[22:43:33] hahuang65: blackcross: see http://api.rubyonrails.org/classes/ActionController/Helpers.html
[23:11:53] vedu_: has joined #RubyOnRails
[23:22:05] Technodrome: has joined #RubyOnRails
[23:28:14] fmcgeough: has joined #RubyOnRails
[23:29:34] nickjj: has joined #RubyOnRails
[23:37:00] Technodrome: has joined #RubyOnRails
[23:48:43] SteenJobs: has joined #RubyOnRails
[23:51:36] SteenJobs: based on the json api spec, from both the perspective of the backend and the client consuming the api, is there any non-semantic reason why including a related resource, e.g. `comments` on an `article`, in the `relationships` object is advantageous to making it a property on the `article` object itself - specifically in a case where there is no `links` object included?
[23:54:40] duderonomy: has joined #RubyOnRails