« Back to channel list

#RubyOnRails - 17 July 2015

« Back 1 day Forward 1 day »
[00:00:09] k4nd4lf: has joined #RubyOnRails
[00:03:51] peeja: has joined #RubyOnRails
[00:03:59] speaking1ode: has joined #RubyOnRails
[00:05:29] slash_nick: has joined #RubyOnRails
[00:06:04] k4nd4lf_: has joined #RubyOnRails
[00:07:51] k4nd4lf_: has joined #RubyOnRails
[00:08:07] rrawlins: has joined #RubyOnRails
[00:11:50] centrx: has joined #RubyOnRails
[00:12:20] bonhoeffer: has joined #RubyOnRails
[00:16:23] lemonada: has joined #RubyOnRails
[00:17:12] lemonada: Does anyone know how can i send an array via post request from one app to another?
[00:17:15] ur5us_: has joined #RubyOnRails
[00:17:51] centrx: lemonada, serialize it and send it as text?
[00:18:22] lemonada: and what to use
[00:18:33] k4nd4lf_: has joined #RubyOnRails
[00:19:03] lemonada: jquery, ajax or ruby?
[00:20:26] centrx: When is the array being sent?
[00:20:55] centrx: lemonada, When user clicks on something? When controller does some back-end things?
[00:21:14] lemonada: when user clicks on button
[00:21:25] baweaver: has joined #RubyOnRails
[00:24:04] centrx: lemonada, Yeah use some Ajax using jQuery
[00:24:23] centrx: lemonada, unless it requires some calculation on the backend, otherwise just keep it in the front-end/client
[00:24:23] lemonada: I already tried with jquery http://pastie.org/10297606
[00:24:26] symbol: has joined #RubyOnRails
[00:24:43] lemonada: and this does nothing
[00:25:08] lemonada: i mean when i puts array on sinatra app it shows nothing
[00:26:52] xkickflip: has joined #RubyOnRails
[00:27:33] crunk_bear: has joined #RubyOnRails
[00:30:04] lethjakman: has joined #RubyOnRails
[00:30:32] quazimodo: has joined #RubyOnRails
[00:30:34] quazimod1: has joined #RubyOnRails
[00:30:58] rrawlins: has joined #RubyOnRails
[00:33:52] Rubie: has joined #RubyOnRails
[00:34:41] bonhoeffer: has joined #RubyOnRails
[00:38:11] jgpawletko: has joined #RubyOnRails
[00:40:08] podman: has joined #RubyOnRails
[00:42:21] slash_nick: has joined #RubyOnRails
[00:43:33] lethjakman: has joined #RubyOnRails
[00:46:54] siemprefresco: has joined #RubyOnRails
[00:49:45] Rubie: has joined #RubyOnRails
[00:51:39] x-light: has joined #RubyOnRails
[00:52:24] paulcsmith: has joined #RubyOnRails
[00:54:28] devdazed: has joined #RubyOnRails
[00:59:49] viiralvx: has joined #RubyOnRails
[01:00:13] rrawlins: has joined #RubyOnRails
[01:01:52] yashinbasement: has joined #RubyOnRails
[01:02:18] yashinbasement: has joined #RubyOnRails
[01:02:25] ledestin: has joined #RubyOnRails
[01:02:48] TheNet: has joined #RubyOnRails
[01:02:49] PhantomSpank: has joined #RubyOnRails
[01:03:45] rrawlins_: has joined #RubyOnRails
[01:05:27] grizzlybair: has joined #RubyOnRails
[01:09:44] shyshy: has joined #RubyOnRails
[01:10:24] jaequery: has joined #RubyOnRails
[01:10:26] DEA7TH: has joined #RubyOnRails
[01:11:49] cnk: has left #RubyOnRails: ()
[01:13:10] seank_: has joined #RubyOnRails
[01:13:12] cornerma1: has joined #RubyOnRails
[01:14:40] mikeric: has joined #RubyOnRails
[01:14:49] TheNet: has joined #RubyOnRails
[01:17:35] DoctorMonocular: I'm trying to publish a gem, but it's barfing on the gemspec, and I have no idea why. Check this out: https://gist.github.com/PeteMichaud/7c34c2dc94d20132d277
[01:18:45] DoctorMonocular: that's the log of me proving that the file exists, then having `gem` claim it doesn't, then having the gem fail to push because of a format error in gemspec. I have no idea what the error could be
[01:19:30] one_zero: has joined #RubyOnRails
[01:19:53] Scripore: has joined #RubyOnRails
[01:21:16] lethjakman: has joined #RubyOnRails
[01:21:36] charliesome: has joined #RubyOnRails
[01:23:08] mike___1234: has joined #RubyOnRails
[01:23:36] slash_nick: DoctorMonocular: Try adding require "bundler/gemtasks" to Rakefile, then `rake release`?
[01:24:04] DoctorMonocular: isn't it bundler/gem_tasks?
[01:25:25] slash_nick: i usually use bundler's templates... bundle gem normal_random
[01:28:27] Lightsword: has joined #RubyOnRails
[01:30:51] s2013: has joined #RubyOnRails
[01:31:33] wethu: has joined #RubyOnRails
[01:33:22] idd2d: has joined #RubyOnRails
[01:33:58] fgo: has joined #RubyOnRails
[01:37:42] mary5030: has joined #RubyOnRails
[01:37:53] markholmes: has joined #RubyOnRails
[01:38:33] beauby: has joined #RubyOnRails
[01:39:20] TheNet: has joined #RubyOnRails
[01:42:49] sevenseacat: has joined #RubyOnRails
[01:44:01] DoctorMonocular: bam, figured it out
[01:44:31] DoctorMonocular: https://rubygems.org/gems/normal_random
[01:45:19] idd2d: has joined #RubyOnRails
[01:47:47] fgo: has joined #RubyOnRails
[01:50:46] GeissT: has joined #RubyOnRails
[01:54:53] Lightsword: has joined #RubyOnRails
[01:55:32] unreal_: has joined #RubyOnRails
[01:57:59] beauby: has joined #RubyOnRails
[01:59:16] Creeves: has joined #RubyOnRails
[02:00:51] quazimodo: has joined #RubyOnRails
[02:02:25] yfeldblum: has joined #RubyOnRails
[02:04:05] seank_: has joined #RubyOnRails
[02:05:19] bungoman: has joined #RubyOnRails
[02:06:00] Aeyrix: Yo what's the rake command to create a blank, named migration?
[02:07:08] grizzlybair: has joined #RubyOnRails
[02:08:56] GeissT: bin/rails g migration NameOfMigration ?? I'm probably wrong.
[02:09:18] GeissT: Not sure of a 'rake' equivalent.
[02:09:27] crwilcox: has joined #RubyOnRails
[02:10:16] beauby: has joined #RubyOnRails
[02:12:29] s2013: Aeyrix what do you mean blank migration.. you can just do what GeissT said
[02:12:35] s2013: and then just modify it
[02:19:49] baweaver: has joined #RubyOnRails
[02:20:32] malcolmva: has joined #RubyOnRails
[02:21:10] Creeves: has joined #RubyOnRails
[02:24:08] eminencehc_: has joined #RubyOnRails
[02:24:36] mikeric: has joined #RubyOnRails
[02:28:10] grizzlybair: has joined #RubyOnRails
[02:28:38] x-light: has joined #RubyOnRails
[02:31:01] dc1: has joined #RubyOnRails
[02:31:35] beauby: has joined #RubyOnRails
[02:31:38] ProLoser: has joined #RubyOnRails
[02:32:12] bonhoeffer: trying to set up heroku with my domain??? why does godaddy have the a record set to some ip ??? like
[02:32:13] bonhoeffer: 184.168.221.42
[02:32:37] k4nd4lf_: has joined #RubyOnRails
[02:32:46] bonhoeffer: shouldn???t that be the ip of my heroku node?
[02:36:26] bungoman: has joined #RubyOnRails
[02:36:48] idd2d: has joined #RubyOnRails
[02:39:06] TheNet: has joined #RubyOnRails
[02:40:15] peeja: has joined #RubyOnRails
[02:40:18] choke: has joined #RubyOnRails
[02:41:18] lwu: has joined #RubyOnRails
[02:42:08] vmarcetic: has joined #RubyOnRails
[02:43:43] Aeyrix: GeissT: Yeah that's the one, cheers.
[02:44:22] choke: has joined #RubyOnRails
[02:44:24] dc1: has joined #RubyOnRails
[02:45:53] beauby: has joined #RubyOnRails
[02:46:07] hahuang65: has joined #RubyOnRails
[02:47:16] Creeves: has joined #RubyOnRails
[02:48:17] charliesome: has joined #RubyOnRails
[02:51:03] VeryBewitching: Has anyone run into this before with enums, this test should succeed but fails: https://gist.github.com/bewitchingme/8958f30404afbfd80277
[02:52:24] rubyonrailed: has joined #RubyOnRails
[02:52:51] choke: building a json api, ive got an Hash of Hashes and an Array of Hashes. trying to figure out the best way to merge the Array into the Hash where a specific key matches.. https://gist.github.com/ch0ke/a3364e33e3160f6f9eb8
[02:52:53] Sylario: has joined #RubyOnRails
[02:52:57] sevenseacat: VeryBewitching: does your role field have a default set?
[02:53:08] symbol: has joined #RubyOnRails
[02:53:10] sevenseacat: also, the inclusion validator isnt required
[02:53:45] VeryBewitching: sevenseacat: I don't have a default set, no.
[02:54:10] sevenseacat: then time to debug your test, see what the user's role is set to in the test
[02:55:05] VeryBewitching: sevenseacat: Ah, it defaults to consumer.
[02:55:28] VeryBewitching: The validator for inclusion does work, though.
[02:55:34] VeryBewitching: In rails console anyway
[02:55:41] sevenseacat: its not necessary. you cant assign an invalid value.
[02:56:42] VeryBewitching: That makes a bit of a pickle to test
[02:56:48] Pupeno_: has joined #RubyOnRails
[02:57:53] eggoez: has joined #RubyOnRails
[02:58:17] VeryBewitching: Well if I can't validate that a value has been specified because it defaults to the first value in the set, what route do I have to test it?
[02:59:52] VeryBewitching: I guess I could test a bad value, or something
[03:01:20] s2013: has joined #RubyOnRails
[03:02:01] sevenseacat: what exactly do you want to test?
[03:02:04] VeryBewitching: Thanks sevenseacat, that helped :D
[03:02:29] VeryBewitching: I don't want a user saved without a role, for any reason, and I do in fact want to ensure that the creator of the account is aware that a role must be set.
[03:02:36] VeryBewitching: To test, user.role = nil
[03:02:57] VeryBewitching: But user.role = 5 throws an exception in the test, so nil it is :D
[03:03:22] sevenseacat: like I said, you can't set an invalid value like 5 :P
[03:03:35] VeryBewitching: Yup, but I wanted to see how it failed.
[03:04:42] mwlang: egags???Rails 1.2 + UTF-8 + Danish == one tough nut to crack.
[03:05:20] beauby: has joined #RubyOnRails
[03:07:50] cpruitt: has joined #RubyOnRails
[03:09:26] braincrash: has joined #RubyOnRails
[03:10:11] _3by8: has joined #RubyOnRails
[03:11:19] _3by8: Unless information relating to an object is stored in a database, there's no way to make that data persist over several pages unless you use a session, right?
[03:11:21] cpruitt: has joined #RubyOnRails
[03:12:33] lethjakman: has joined #RubyOnRails
[03:12:43] lwu_: has joined #RubyOnRails
[03:13:27] _3by8: Or writing a file out I guess would work too but seems not as good as writing to a database. If you're trying to save data across multiple page clicks is the only way to do it with a session?
[03:14:46] smathy: _3by8, well regardless of where you store the data, you still have to use a cookie (the simplest way to do that is to use the Rails session) in order for the same browser to be recognized through multiple requests.
[03:15:10] willywos: has joined #RubyOnRails
[03:15:11] OS-14813: has joined #RubyOnRails
[03:15:26] OS-14813: hi guys, I'm having problems with some test controllers specs that seems to be maintaing session state. I have three test cases for authentication tests, one check response for an unauthenticated user, one from a normal authenticated user and other from an admin authenticated user. The problem arises when the unauthenticated test
[03:15:29] _3by8: smathy: thanks.
[03:15:56] smathy: _3by8, there are many different places to store the data including a DB, a file, RAM, a network device/service of some sort, etc. but none of that means anything without being able to tie two HTTP requests to the same browser.
[03:15:58] siempref_: has joined #RubyOnRails
[03:16:00] smathy: _3by8, you're welcome.
[03:16:31] smathy: OS-14813, !gist your test please
[03:16:31] helpa: OS-14813: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[03:16:37] OS-14813: comes after one of the authenticated test cases. In this situation it fails, as the user seems to be auth
[03:17:56] Hates__: has joined #RubyOnRails
[03:17:57] one_zero: has joined #RubyOnRails
[03:19:09] Hates_: has joined #RubyOnRails
[03:20:59] Hates_: has joined #RubyOnRails
[03:21:22] rrawlins: has joined #RubyOnRails
[03:21:33] vere: has joined #RubyOnRails
[03:21:40] dc1: has joined #RubyOnRails
[03:23:25] jenrzzz: has joined #RubyOnRails
[03:24:37] OS-14813: https://gist.github.com/anonymous/6f03a9545c662eb7aa30
[03:25:09] Radar: my good ness
[03:25:17] Radar: OS-14813: I heard you like tabs. Confirm / deny?
[03:27:56] mwlang: So???Ruby 1.8.7 + Rails 1.2 => the user keys in what I???m pretty sure is supposed to be regnskabsl??re but what I???m getting in the params is regns?????t which, if I feed to MS-SQL Server, leads to a TinyTds::Error: Error converting characters into server's character set error.
[03:28:36] VeryBewitching: TabWidth.set(2)
[03:29:53] mwlang: Tabs, you say? Doesn???t that belong on typewriters?
[03:30:11] Aeyrix: [ twitching intensifies ]
[03:30:25] mwlang: Aeyrix: oh, yeah???.that???s what???s at the top of manella folders.
[03:30:31] VeryBewitching: TabWidth.use_spaces true
[03:31:03] VeryBewitching: You mean: :1,$s/\t/ /g ?
[03:31:54] VeryBewitching: Why the vi hate?
[03:32:59] choke: Don't worry OS-14813 i like tabs too, but I do what VeryBewitching did and that's to use tab as spaces.. Same visual effect and that's all I really care about lol
[03:34:26] OS-14813: so the problem there is the unautheticated test case, which run fine if its the first one, chaing order fails, cause the request seems to belong to the session of the test case before, being it the user or admin test case
[03:34:44] OS-14813: does controller test cases maintain session ?
[03:35:37] choke: https://gist.github.com/ch0ke/7ce60fcadb64d59f309e any reason why that code should take 350ms to do or know of a better way to do what it's doing?
[03:37:07] sevenseacat: choke: how many @posts are there?
[03:37:32] sevenseacat: is @posts evaluated before the Benchmark starts?
[03:37:39] choke: like 2500...
[03:38:09] choke: this is the full gist of what i'm trying to achieve: https://gist.github.com/ch0ke/a3364e33e3160f6f9eb8
[03:38:19] sevenseacat: group_by(:place_id) ?
[03:38:30] Rubie: has joined #RubyOnRails
[03:38:45] elmhouse: has joined #RubyOnRails
[03:38:56] choke: let me try
[03:39:48] sevenseacat: Post.any_in(place_id: @resources.distinct(:place_id)) ?
[03:40:16] sevenseacat: have no idea if mongoid supports that kind of stuff
[03:40:21] Aeyrix: > spent forty minutes fighting Clearance
[03:40:28] Aeyrix: > realised i fucked up by manually creating the user
[03:40:37] Aeyrix: Can't do anything myself with Rails, it seems.
[03:40:54] Aeyrix: Also railsbot now has commits claiming I'm being oppressed.
[03:40:58] Aeyrix: Work complete.
[03:41:27] Aeyrix: https://github.com/radar/railsbot/commits/master
[03:41:28] siemprefresco: has joined #RubyOnRails
[03:41:33] lethjakman: has joined #RubyOnRails
[03:45:03] bruno-: has joined #RubyOnRails
[03:45:43] bbrowning_: has joined #RubyOnRails
[03:47:40] Aeyrix: Hey what are peoples' thoughts on things like Heroku versus a VPS?
[03:47:42] Aeyrix: Just a survey.
[03:47:57] sevenseacat: depends on the project.
[03:48:17] Aeyrix: There's cases you'd opt for the former over the latter?
[03:48:21] sevenseacat: like, if it was me building toy apps, I'd go to heroku every time because I'm a lazy shit
[03:48:23] mwlang: can anyone remember the charset Rails 1.2 utilized when doing international characters? Using curl -I against the existing server, I get back a response with Content-Type: text/html; charset=iso-8859-1 but I could???ve sworn even back in the day Ruby sent UTF-8 and expected UTF-8
[03:48:49] Aeyrix: ... Rails 1.2?
[03:48:54] mwlang: (yeah it???s old; it???s dead; but it???s still alive here until I slay it with RoR4)
[03:49:25] Aeyrix: One of the earliest stakeholders in Rails is before us, ladies and gentlemen.
[03:49:52] sevenseacat: ACTION considers everything before Rails 3 prehistoric and not worth worrying about
[03:50:46] mwlang: sevenseacat: maybe they need to add a new channel ruby-prehistoric
[03:50:59] sevenseacat: population: mwlang
[03:51:15] peeja: has joined #RubyOnRails
[03:51:18] Creeves: quick question about a project I'm working on (not rails related but be good to get some opinions), i'm building the timetable signage that will be outside nearly every room at my uni and have been given the design + colours but I think their idea of black text on grey background would look better with white text, let me know what you guys think - their design: http://i.imgur.com/Klb1xFP.png
[03:51:18] Creeves: my colour change: http://i.imgur.com/OXSIc7u.png
[03:51:56] mwlang: sevenseacat: Ah???.it???ll make a comeback in 30 years when retiring devs start ressurrecting Rails 1.2 VM???s like they???re Atari games.
[03:52:18] sevenseacat: Creeves: I don't find either very clear to read. that grey should be significantly lightened IMO, then the black will be okay on it
[03:52:53] Creeves: sevenseacat: thanks, that's what i thought too. what do you think about the white text on the grey?
[03:52:58] Creeves: oh i misread
[03:53:04] sevenseacat: I prefer the black text on the grey though, if I had to pick one
[03:53:23] Creeves: awesome okay, ill make one up with a lighter grey bg
[03:53:50] Creeves: the whole design isn't the most pretty tbh, but i don't have much control over that
[03:53:59] sevenseacat: you're not wrong there :P
[03:54:18] Creeves: you should see their old colours
[03:54:50] mwlang: first revision half again as light on the gray background so black text contrasts.
[03:55:25] Creeves: mwlang: nice, sounds like a good consensus
[03:55:32] choke: group_by seems to give me an error on the arguments ( 1 for 0 ) and the other one returns nothing.. playing around I just keep getting errors
[03:55:34] Creeves: thanks for the input
[03:55:55] choke: May end up ditching mongoid in favor of the native mongo drivers
[03:56:17] x-light: Q: Does a has many :through table require an 'id' key (in addition to the other foreign keys)?
[03:57:00] x-light: I don't anticipate having to add other columns to the hmt table.
[03:57:14] Creeves: yeah when they thought they had to use the official uni colours it looked something like: http://i.imgur.com/iKexEOJ.png
[03:57:17] Creeves: so very ugly -.-
[03:58:08] sevenseacat: to be honest, it's a lot more readable.
[03:58:21] sevenseacat: the logo part is freaking horrible though
[03:58:21] Creeves: oh yeah, true
[03:58:45] Creeves: yeah the way it sticks out
[03:58:51] Creeves: that's actually a university standard for design
[03:58:54] Creeves: http://sydney.edu.au/
[03:58:57] sevenseacat: x-light: yes, it will be a model so it requires an ID.
[03:59:08] sevenseacat: Creeves: lol wtf
[03:59:17] Creeves: yeah, it's like they hate screen real estate
[03:59:30] x-light: sweet thanks sevenseacat
[03:59:43] arup_r: has joined #RubyOnRails
[03:59:50] sevenseacat: x-light: if it's just a model with two FKs I'd question the need for it to exist, though
[04:00:30] arup_r: Can I create a column like t.decimal scale: 3 # without putting precision ?
[04:00:37] sevenseacat: arup_r: does it work?
[04:01:00] arup_r: No.. or I always need to mention both ? I am talking about migrations
[04:01:06] melonstorm: has joined #RubyOnRails
[04:01:14] sevenseacat: if it doesnt work, then you can't.
[04:01:31] yash_: has joined #RubyOnRails
[04:02:05] arup_r: ok you mean I always need to mention the both scale and precision ... right?
[04:02:06] x-light: sevenseacat: yeah true. At this stage I don't see a need for further fields to be added to the join table, but you never know what the designer is thinking ;)
[04:02:19] Creeves: damn designers
[04:04:21] fighella: has joined #RubyOnRails
[04:06:34] bungoman: has joined #RubyOnRails
[04:06:40] GeissT: Aeyrix: No worries! Good luck!
[04:08:50] bronson: has joined #RubyOnRails
[04:11:07] yfeldblum: has joined #RubyOnRails
[04:16:55] moj: has joined #RubyOnRails
[04:18:07] rubyonrailed: has joined #RubyOnRails
[04:18:18] arup_r: I would like to write a migration by which I need to remove the not null constraint from this https://gist.github.com/aruprakshit/68f8d2770340f1063f7c#file-schema-rb-L12
[04:18:36] arup_r: change_column is not for that it seems, what is the alternative ?
[04:20:18] arup_r: nvm, found it http://apidock.com/rails/ActiveRecord/ConnectionAdapters/SchemaStatements/change_column_null
[04:21:13] giowong: has joined #RubyOnRails
[04:28:20] towski_: has joined #RubyOnRails
[04:29:13] duderonomy: has joined #RubyOnRails
[04:29:36] tjbiddle: has joined #RubyOnRails
[04:31:04] earthquake: has joined #RubyOnRails
[04:39:33] arooni-mobile: has joined #RubyOnRails
[04:41:29] arooni-mobile: has joined #RubyOnRails
[04:43:03] mikepack: has joined #RubyOnRails
[04:44:29] melonstorm: has joined #RubyOnRails
[04:46:24] Anakat: has joined #RubyOnRails
[04:48:55] eminencehc_: has joined #RubyOnRails
[04:50:56] AndroUser466: has joined #RubyOnRails
[04:52:43] crdpink: has joined #RubyOnRails
[04:53:53] dideler: has joined #RubyOnRails
[04:55:05] l0oky: has joined #RubyOnRails
[04:56:12] fgo: has joined #RubyOnRails
[04:58:08] dc1: has joined #RubyOnRails
[04:59:24] srinidhi: has joined #RubyOnRails
[05:07:55] imton: has joined #RubyOnRails
[05:08:13] siempref_: has joined #RubyOnRails
[05:09:13] towski_: has joined #RubyOnRails
[05:13:38] dhjondoh: has joined #RubyOnRails
[05:16:04] wethu: has joined #RubyOnRails
[05:16:13] markholmes: has joined #RubyOnRails
[05:17:03] vigasdeep: has joined #RubyOnRails
[05:17:36] xcesariox: has joined #RubyOnRails
[05:19:24] Silent__: has joined #RubyOnRails
[05:19:53] bmurt: has joined #RubyOnRails
[05:20:14] sp1rs: has joined #RubyOnRails
[05:20:18] toydestroyer_: has joined #RubyOnRails
[05:21:27] Hates__: has joined #RubyOnRails
[05:21:41] nightsh_: has joined #RubyOnRails
[05:22:15] BBHoss_: has joined #RubyOnRails
[05:22:16] contradictioned_: has joined #RubyOnRails
[05:22:20] grandy_: has joined #RubyOnRails
[05:22:21] Rixius|Alt: has joined #RubyOnRails
[05:22:22] richipar1o: has joined #RubyOnRails
[05:22:25] bmurt: has joined #RubyOnRails
[05:22:29] dustinm`_: has joined #RubyOnRails
[05:22:31] prasselpikachu_: has joined #RubyOnRails
[05:22:42] eyck: has joined #RubyOnRails
[05:23:02] drzel_: has joined #RubyOnRails
[05:23:02] weltzooo3: has joined #RubyOnRails
[05:23:05] yie_: has joined #RubyOnRails
[05:23:06] phrozen7-: has joined #RubyOnRails
[05:23:08] coffeeju1: has joined #RubyOnRails
[05:23:12] rhizome_: has joined #RubyOnRails
[05:23:24] JonasOSDever_: has joined #RubyOnRails
[05:23:30] hosh_: has joined #RubyOnRails
[05:23:37] soahccc^: has joined #RubyOnRails
[05:23:46] vedu: has joined #RubyOnRails
[05:23:55] atrius: has joined #RubyOnRails
[05:24:02] camilasan: has joined #RubyOnRails
[05:24:24] zz_denym_: has joined #RubyOnRails
[05:24:53] x3cion: has joined #RubyOnRails
[05:25:04] mozzarella: has joined #RubyOnRails
[05:25:09] hfp: has joined #RubyOnRails
[05:26:14] htmldrum: has joined #RubyOnRails
[05:26:55] maZtah: has joined #RubyOnRails
[05:27:06] corioliss: has joined #RubyOnRails
[05:27:37] lacrosse: has joined #RubyOnRails
[05:28:00] joaomdmoura: has joined #RubyOnRails
[05:28:38] hashrocket: has joined #RubyOnRails
[05:29:07] jobewan: has joined #RubyOnRails
[05:29:07] bmurt: has joined #RubyOnRails
[05:29:17] lxkm__: has joined #RubyOnRails
[05:29:45] nahtnam: has joined #RubyOnRails
[05:30:20] htmldrum: I recently found the ActiveType Gem to help sepparate out model functionality for fat models. Any other suggestions on gems to help scale web services?
[05:31:30] nahtnam: Im trying to build my own json manually: https://gist.github.com/nahtnam/b6cf6a22f2af86acea1a#file-test-rb <- Assume all variables are valid. It generates json like this: https://gist.github.com/nahtnam/b6cf6a22f2af86acea1a#file-status-json I was wondering if there was an easy way to add the root key `status: {}` to it so that a js framework can easily parse
[05:32:31] ur5us: has joined #RubyOnRails
[05:33:29] baweaver: has joined #RubyOnRails
[05:34:42] nahtnam: Came up with a janky solution
[05:34:53] aganov: has joined #RubyOnRails
[05:35:09] nahtnam: @status = {:status => @status}.to_json
[05:37:32] krokuz_: has joined #RubyOnRails
[05:38:51] DoubleMalt: has joined #RubyOnRails
[05:41:15] nahtnam: Quick question
[05:41:23] nahtnam: Actually ill just try it myself
[05:42:15] baweaver_: has joined #RubyOnRails
[05:43:28] earthquake: has joined #RubyOnRails
[05:48:27] differentreality: has joined #RubyOnRails
[05:48:44] differentreality: has joined #RubyOnRails
[05:49:16] rrawlins: has joined #RubyOnRails
[05:49:24] JohnBat26: has joined #RubyOnRails
[05:51:00] rrawlins: has joined #RubyOnRails
[05:51:48] arup_r: has joined #RubyOnRails
[05:52:40] rrawlins: has joined #RubyOnRails
[05:57:38] fgo_: has joined #RubyOnRails
[05:57:57] rrawlins: has joined #RubyOnRails
[05:58:01] rails663: has joined #RubyOnRails
[05:58:53] tagrudev: has joined #RubyOnRails
[05:58:53] djbkd: has joined #RubyOnRails
[06:01:02] rogue_koder: has joined #RubyOnRails
[06:01:43] schaerli: has joined #RubyOnRails
[06:03:21] mauro1254: has joined #RubyOnRails
[06:06:20] nahtnam: Quick question
[06:06:32] nahtnam: Does rails return json with camel case or snake case?
[06:06:43] nahtnam: by default
[06:09:35] nahtnam: Im gonna guess snake_case
[06:11:09] eminencehc_: has joined #RubyOnRails
[06:12:00] eGGsha: has joined #RubyOnRails
[06:13:08] arBmind: has joined #RubyOnRails
[06:15:49] schaerli: has joined #RubyOnRails
[06:17:46] jesterfraud: has joined #RubyOnRails
[06:18:09] roolo: has joined #RubyOnRails
[06:18:22] lwu: has joined #RubyOnRails
[06:22:04] brianpWins: has joined #RubyOnRails
[06:23:05] konsolebox: has joined #RubyOnRails
[06:25:56] Karpah: has joined #RubyOnRails
[06:26:58] bonhoeffer: has joined #RubyOnRails
[06:28:10] FCser: has joined #RubyOnRails
[06:29:11] arup_r: has joined #RubyOnRails
[06:29:38] bonhoeffer: i have an entry_date of type date in my model, i want this to come off as a Time object ??? i thought about rendering this: User.first.journal_entries.map {|k| k.entry_date = k.entry_date.to_time}
[06:29:51] bonhoeffer: but that doesn???t work ??? now i???m thinking about a synthetic attribute on the model
[06:30:13] euphoriaa: has joined #RubyOnRails
[06:30:32] bonhoeffer: like: def entry_time self.entry_date.to_datetime end
[06:31:04] Radar: bonhoeffer: Why do you want it as a Time object?
[06:31:08] Radar: When it's clearly a date?
[06:31:22] bonhoeffer: a plugin i???m working with (simple_calendar)
[06:31:28] bonhoeffer: requires events to be date_time
[06:31:46] bonhoeffer: as far as i can tell ??? and by plugin, I mean gem
[06:32:56] Radar: try telling harder
[06:33:03] Radar: What happens when it's given a date?
[06:33:26] bonhoeffer: undefined method `in_time_zone' for nil:NilClass
[06:34:05] bonhoeffer: from https://github.com/excid3/simple_calendar/blob/b2ce871b7a7e0245acca3404830c803b9b07fb38/lib/simple_calendar/calendar.rb#L76
[06:34:37] bonhoeffer: oh ??? that looks like opts.fetch(:timezone, Time.zone) is not defined
[06:38:31] bonhoeffer: i wonder if this is a rails 4/3 difference
[06:39:14] MaDErroR123: has joined #RubyOnRails
[06:40:46] bmurt: has joined #RubyOnRails
[06:41:05] microdex: has joined #RubyOnRails
[06:42:11] Rubie: has joined #RubyOnRails
[06:44:17] bonhoeffer: Radar: any thoughts? I tried setting the timezone explicitly several places
[06:45:00] tjbiddle: has joined #RubyOnRails
[06:45:25] Sylario: has joined #RubyOnRails
[06:46:45] bonhoeffer: Time.zone is definitely defined
[06:47:33] Radar: glhf byebye
[06:51:18] rickmasta: has joined #RubyOnRails
[06:51:31] kham: has joined #RubyOnRails
[06:52:22] krz: has joined #RubyOnRails
[06:53:10] fgo_: has joined #RubyOnRails
[06:54:53] digifiv5e: has joined #RubyOnRails
[06:58:01] schaerli: has joined #RubyOnRails
[06:58:34] LBo: has joined #RubyOnRails
[06:59:15] bonhoeffer: isn???t there a way to see if an active record object is new?
[06:59:33] sevenseacat: yeah, `new_record?`
[06:59:37] sevenseacat: just checks if it has an ID or not.
[06:59:39] bonhoeffer: cool ??? thanks
[07:00:44] bonhoeffer: nice! i???m trying to get all elements in my new view ??? and the elements list includes that one ??? how can i exclude it ??? i???m surprised it is there, i thought MyModel.all found only records in the database
[07:00:59] bonhoeffer: literally did a ???Select * from MyModel???
[07:01:37] sevenseacat: you obviously did a build or something somewhere :P
[07:01:56] Tinyyy: has joined #RubyOnRails
[07:02:40] bonhoeffer: hmm . . . ok ??? agreed
[07:03:17] kp666: has joined #RubyOnRails
[07:03:18] rrawlins: has joined #RubyOnRails
[07:04:22] bonhoeffer: will write up
[07:06:09] rrawlins_: has joined #RubyOnRails
[07:06:19] bonhoeffer: https://gist.github.com/tbbooher/72861b34da853796f9cd
[07:06:50] bonhoeffer: so, cancancan is involved, and i do a before_filter: @journal_entries = @user.journal_entries
[07:07:01] bonhoeffer: @user.journal_entries.last.new_record? => true
[07:07:28] bonhoeffer: in the rails console @user.journal_entries.size => 10, in the new controller scope: @user.journal_entries.size => 11
[07:07:41] bonhoeffer: in the scope of the new method
[07:07:49] bonhoeffer: sorry i didn???t trim down
[07:07:57] sevenseacat: because load_and_authorize_resource will do @journal_entry = @user.journal_entries.build
[07:08:03] sevenseacat: in the new action
[07:08:18] sevenseacat: which will add the new entry to @user.journal_entries
[07:08:26] bonhoeffer: yeah ??? i was suspecting cancancan ??? you got it
[07:08:49] bonhoeffer: so the solution . . . remove from array if new_record?
[07:09:08] bonhoeffer: or load the journal_entries before load_and_authorize_resource
[07:09:50] sevenseacat: well its not an array
[07:10:00] sevenseacat: and I personally think cancancan is a POS and shouldnt be used
[07:10:33] sevenseacat: in the past I've done similar things by adding a 'persisted' scope in models
[07:10:39] bonhoeffer: yeah ??? i know, i???m speeding
[07:10:39] sevenseacat: that just does `where(
[07:10:44] sevenseacat: 'id is not null')
[07:11:08] bonhoeffer: yeah ??? using gems that i should be building myself
[07:11:16] bonhoeffer: and that i don???t understand
[07:11:20] eGGsha: has joined #RubyOnRails
[07:11:27] bonhoeffer: like your scope idea
[07:11:49] bonhoeffer: for example, cancancan does things I don???t follow ??? that is speeding in my mind
[07:12:18] bonhoeffer: wher you clearly get the internals
[07:12:58] sevenseacat: it does a lot of gnarly things in the internals
[07:13:27] bonhoeffer: which i don???t know . . . anyway ??? why do you say AR doesn???t produce an array from a query
[07:13:37] sevenseacat: because it produces an ActiveRecord::Relation
[07:13:43] bonhoeffer: ok ??? i see JournalEntry::ActiveRecord_Associations_CollectionProxy
[07:15:15] bmurt: has joined #RubyOnRails
[07:18:04] mjansing: has joined #RubyOnRails
[07:19:16] schaerli: has joined #RubyOnRails
[07:19:20] mjansing: has left #RubyOnRails: ()
[07:19:24] bonhoeffer: bah ??? i forget how scopes work with associations ??? a user has_many journal_entries as a nested resource, i have a scope on journal entries scope :old_entries, -> { where('id is not null') } ??? i want all the old entries for a user now
[07:19:46] bonhoeffer: of course User.first.old_entries doesn???t work ??? it is a scope on journal entries
[07:19:56] bonhoeffer: think i need a lambda in the scope
[07:20:01] bonhoeffer: and to make it on user
[07:20:37] pwnz0r: has joined #RubyOnRails
[07:22:18] Trefex: has joined #RubyOnRails
[07:22:19] bonhoeffer: JournalEntry.old_entries works well
[07:23:51] sevenseacat: User.first.journal_entries.old_entrues
[07:24:31] bonhoeffer: ok ??? makes sense thanks
[07:24:33] Palsson: has joined #RubyOnRails
[07:24:41] bonhoeffer: just adds to the sql query i hope
[07:24:50] sevenseacat: easy way to find out
[07:24:57] bonhoeffer: yep ??? looking now
[07:25:38] sp1rs: has joined #RubyOnRails
[07:27:04] bonhoeffer: sevenseacat: https://gist.github.com/tbbooher/496868a3bf1a5674873d <??? thoughts?
[07:28:09] sevenseacat: well using factory girl to build journal entries is very different than using rails' associations to build them
[07:28:15] sevenseacat: so I wouldn't expect them to act the same
[07:28:21] elmhouse: has joined #RubyOnRails
[07:28:38] bonhoeffer: got it ??? ok ??? here is to testing at the controller level
[07:28:48] Maletor: has joined #RubyOnRails
[07:29:06] artto: has joined #RubyOnRails
[07:29:52] bronson: has joined #RubyOnRails
[07:30:30] bonhoeffer: ok ??? works now: https://gist.github.com/tbbooher/496868a3bf1a5674873d
[07:31:00] bonhoeffer: before ??? i meant to test to see if this works from the users???s perspective
[07:31:30] bruno-: has joined #RubyOnRails
[07:31:55] bonhoeffer: thanks for the help
[07:34:18] schaerli: has joined #RubyOnRails
[07:38:23] vmarcetic: has joined #RubyOnRails
[07:39:05] sp1rs: has joined #RubyOnRails
[07:41:52] jenrzzz: has joined #RubyOnRails
[07:41:57] schaerli: has joined #RubyOnRails
[07:42:18] MaDErroR123: has joined #RubyOnRails
[07:42:27] jarr0dsz: has joined #RubyOnRails
[07:42:50] x-light: has joined #RubyOnRails
[07:50:51] livathinos: has joined #RubyOnRails
[07:51:41] MaDErroR123: has joined #RubyOnRails
[07:52:00] MaDErroR123: has joined #RubyOnRails
[07:53:35] artto_: has joined #RubyOnRails
[07:54:39] DoubleMalt: has joined #RubyOnRails
[07:55:01] nickenchuggets: has joined #RubyOnRails
[07:55:01] nickenchuggets: has joined #RubyOnRails
[07:55:18] schaerli: has joined #RubyOnRails
[07:57:41] jsrn_: has joined #RubyOnRails
[07:58:34] obb12: has joined #RubyOnRails
[07:59:21] tsvenson: has joined #RubyOnRails
[07:59:25] nickenchuggets: has joined #RubyOnRails
[07:59:25] nickenchuggets: has joined #RubyOnRails
[08:00:25] terpo: has joined #RubyOnRails
[08:04:26] mikecmpbll: has joined #RubyOnRails
[08:04:37] axl_: has joined #RubyOnRails
[08:07:38] Shoutsid: has joined #RubyOnRails
[08:07:39] slash_nick: has joined #RubyOnRails
[08:09:56] strcmp1: has joined #RubyOnRails
[08:09:58] slash_nick: has joined #RubyOnRails
[08:11:37] Maletor: has joined #RubyOnRails
[08:13:02] choke: has joined #RubyOnRails
[08:14:32] krz: has joined #RubyOnRails
[08:17:05] artto: has joined #RubyOnRails
[08:17:27] schaerli: has joined #RubyOnRails
[08:21:21] ruurd: has joined #RubyOnRails
[08:22:52] marr: has joined #RubyOnRails
[08:24:18] slash_nick: has joined #RubyOnRails
[08:24:28] jenrzzz: has joined #RubyOnRails
[08:24:47] kitsuneyo: has joined #RubyOnRails
[08:26:12] emilkarl: has joined #RubyOnRails
[08:26:23] eGGsha: has joined #RubyOnRails
[08:26:27] apeiros: awesome. I have no idea what `config.assets.enabled = true` is supposed to do, but when it's in the application.rb, sass in haml no longer works with a weird exception.
[08:26:52] apeiros: (I assume it's a config setting which was necessary in rails 3 and now in rails 4 is no longer necessary???)
[08:27:18] anti-freeze: has joined #RubyOnRails
[08:27:22] apeiros: and just to clarify: don't need help :) just sharing this odd piece of info???
[08:28:12] darutoko: has joined #RubyOnRails
[08:28:40] sevenseacat: yeah all of those asset-related settings have chopped and changed a lot over time
[08:28:49] abuzze: has joined #RubyOnRails
[08:28:54] sevenseacat: I just try not to touch them anymore.
[08:29:38] apeiros: that's what I did. apparently that leads to sad bombings :(
[08:29:52] apeiros: was quite a bit to figure the responsible part.
[08:31:12] apeiros: the error was just this: https://gist.github.com/apeiros/749005c626234c1381c9
[08:31:16] rthbound: has joined #RubyOnRails
[08:31:27] apeiros: (which occurred when I ran Haml::Engine#render)
[08:31:39] apeiros: try to figure from that that it's some config in your application.rb :D
[08:32:18] slash_nick: has joined #RubyOnRails
[08:32:33] stamina: has joined #RubyOnRails
[08:34:37] arBmind: has joined #RubyOnRails
[08:40:40] DEA7TH: has joined #RubyOnRails
[08:43:50] lemonada: has joined #RubyOnRails
[08:45:53] DEA7TH_: has joined #RubyOnRails
[08:47:45] siemprefresco: has joined #RubyOnRails
[08:48:08] arup_r: has joined #RubyOnRails
[08:49:51] arup_r1: has joined #RubyOnRails
[08:50:04] moj: has joined #RubyOnRails
[08:53:00] arBmind1: has joined #RubyOnRails
[08:54:19] Trefex1: has joined #RubyOnRails
[08:55:16] srinidhi: has joined #RubyOnRails
[08:55:42] iooner: has joined #RubyOnRails
[09:02:58] fighella: has joined #RubyOnRails
[09:03:06] arup_r: has joined #RubyOnRails
[09:04:34] htmldrum: has joined #RubyOnRails
[09:05:03] schaerli: has joined #RubyOnRails
[09:07:46] ndrei: has joined #RubyOnRails
[09:07:55] ndrei_: has joined #RubyOnRails
[09:09:22] lemonada: has joined #RubyOnRails
[09:09:36] chrissonar: has joined #RubyOnRails
[09:10:03] lemonada: How to use Net::HTTP to post a string to another app?
[09:13:08] l0oky: has joined #RubyOnRails
[09:13:53] fighella: has joined #RubyOnRails
[09:15:03] noodman: has joined #RubyOnRails
[09:15:10] krz: i have some logic taht checks for some params in the controller. if those params are not present, render a json 404 object with a message (depending on what params are missing). i plan on extracting this logic out into somewhere else, as the controlelr is starting to look fat. which pattern do you all recommend?
[09:15:15] JulienTant: has joined #RubyOnRails
[09:15:15] krz: utility object maybe?
[09:15:55] krz: presenter?
[09:16:13] yfeldblum: has joined #RubyOnRails
[09:17:24] elmhouse: has joined #RubyOnRails
[09:17:33] Ropeney: has joined #RubyOnRails
[09:19:15] simmerz: has joined #RubyOnRails
[09:19:38] Bilbo-baggons: has joined #RubyOnRails
[09:23:31] eGGsha: has joined #RubyOnRails
[09:24:05] yfeldblum: has joined #RubyOnRails
[09:26:07] quazimodo: has joined #RubyOnRails
[09:26:34] jenrzzz: has joined #RubyOnRails
[09:27:02] bronson: has joined #RubyOnRails
[09:27:21] ruurd: has joined #RubyOnRails
[09:27:52] noodman: has joined #RubyOnRails
[09:28:59] madebymarkca: has joined #RubyOnRails
[09:29:48] Bilbo-baggons: hey there peps, I wonder if someone can point me in the right direction, I have been pulling my hair out on this for some. I have a show view for ???gardeners???, which works as it should, but with certain records I get an error, but this error only happens on heroku, if I recreate the data identically it doesn???t happen locally. I have attached a gist here, https://gist.github.com/soilforlifeforms/09d3705422bb4ffa9086 if anyone can give any
[09:29:49] Bilbo-baggons: advice, or even how I can go about seeing what params are missing here, because it seems to be losing a param somewhere, but I???m not sure where.
[09:30:44] kitsuneyo: has joined #RubyOnRails
[09:30:52] schaerli: has joined #RubyOnRails
[09:31:04] lemonada: has joined #RubyOnRails
[09:31:32] lemonada: How to post string from one app to another using Net::HTTP?
[09:31:34] Silox|: has joined #RubyOnRails
[09:32:23] rubyonrails450: has joined #RubyOnRails
[09:36:16] n008f4g_: has joined #RubyOnRails
[09:37:07] Trefex: has joined #RubyOnRails
[09:39:45] leslie: What's the best way to deal with an html select in a form that populates another select? For example, a country select that populates a list of states/regions in another select
[09:40:32] elmhouse: has joined #RubyOnRails
[09:40:54] _utah_: has joined #RubyOnRails
[09:43:11] Bilbo-baggons: leslie: http://railscasts.com/episodes/88-dynamic-select-menus-revised
[09:44:03] sce_: has joined #RubyOnRails
[09:44:17] fighella: has joined #RubyOnRails
[09:45:22] konsolebox: has joined #RubyOnRails
[09:46:32] leslie: Bilbo-baggons, thanks :)
[09:47:28] yardenbar: has joined #RubyOnRails
[09:48:21] konsolebox: has joined #RubyOnRails
[09:48:58] toydestroyer: has joined #RubyOnRails
[09:49:48] fighella: has joined #RubyOnRails
[09:50:02] jottr: has joined #RubyOnRails
[09:50:13] sevenseacat: leslie: see carmen-rails gem
[09:50:33] kham: has joined #RubyOnRails
[09:50:35] htmldrum: has joined #RubyOnRails
[09:50:40] sevenseacat: in particular, this demo app - https://github.com/jim/carmen-demo-app
[09:51:13] sevenseacat: example here: http://carmen-rails-demo.herokuapp.com/
[09:52:13] konsolebox: has joined #RubyOnRails
[09:52:31] schaerli: has joined #RubyOnRails
[09:53:18] siempref_: has joined #RubyOnRails
[09:54:23] blackhuey: has joined #RubyOnRails
[09:54:28] leslie: will do, thanks sevenseacat
[09:56:08] lxsameer: has joined #RubyOnRails
[10:03:43] microdex: has joined #RubyOnRails
[10:04:22] tenderlo_: has joined #RubyOnRails
[10:05:10] eGGsha: has joined #RubyOnRails
[10:07:22] DoctorMonocular: has joined #RubyOnRails
[10:09:40] jottr_: has joined #RubyOnRails
[10:11:49] iooner: has joined #RubyOnRails
[10:13:43] sp1rs: has joined #RubyOnRails
[10:16:58] srinidhi: has joined #RubyOnRails
[10:19:41] CheckYourSix: has joined #RubyOnRails
[10:21:31] ndrei: has joined #RubyOnRails
[10:22:46] p1k: has joined #RubyOnRails
[10:23:29] allcentury: has joined #RubyOnRails
[10:23:38] DEA7TH_: has joined #RubyOnRails
[10:24:16] p1k: so I've noticed that if .changed? is called in an after_save hook it will always return true and display the previous changes (which have already been joined into a transaction)
[10:24:19] cochise: has joined #RubyOnRails
[10:24:23] p1k: is this well-documented somewhere?
[10:24:28] bruno-: has joined #RubyOnRails
[10:26:33] ndrei_: has joined #RubyOnRails
[10:29:42] dANO-: has joined #RubyOnRails
[10:30:24] ruurd: has joined #RubyOnRails
[10:30:59] masscrx: Im thinking how to resolve some case, I have application with two, maybe three roles in future - admin, manager, customer, for admin and manager will be one view (with some not big difference in read/write access) and for customer another view, so should I create two models? Admin and User ? or one model User with cancan roles ? now I have one User model with roles but what with controllers, after user sign in he is redirected to home#index by default,
[10:31:15] eminencehc_: has joined #RubyOnRails
[10:33:51] intinig: has joined #RubyOnRails
[10:35:10] Anubix1: has joined #RubyOnRails
[10:36:23] Anubix1: has left #RubyOnRails: ()
[10:39:38] mostlybadfly: has joined #RubyOnRails
[10:40:12] Papierkorb: has joined #RubyOnRails
[10:41:25] Papierkorb: has joined #RubyOnRails
[10:42:54] lemonada: How to send string from one app to another app using http?
[10:46:19] aceRacer: has joined #RubyOnRails
[10:46:44] wldcordeiro: has joined #RubyOnRails
[10:46:45] aceRacer: what does it mean by loading the author resource (load_resource in cancan) https://github.com/ryanb/cancan/blob/4560928dc375f9b31de00381c98334eb6aabc4b9/lib/cancan/controller_additions.rb#L56
[10:49:05] Trefex1: has joined #RubyOnRails
[10:55:58] arup_r: How can I write it using call back support `Model.where(:foo => 'bar').update_all("author = 'David' || 'Cw'")` ?
[10:57:23] MEATCHICKEN: has joined #RubyOnRails
[10:58:13] sevenseacat: you might have to explain what you mean by 'callback support'
[10:58:34] sevenseacat: do you mean that it will call callbacks of each of the updated records? because thats not how update_all works
[10:59:39] masscrx: arup_r: you can add callback like after_update :do_something and then add :do_something method with some action
[11:00:27] arup_r: masscrx: humm.. But then my existing code will stop working..
[11:00:33] masscrx: sevenseacat: Im thinking how to resolve some case, I have application with two, maybe three roles in future - admin, manager, customer, for admin and manager will be one view (with some not big difference in read/write access) and for customer another view, so should I create two models? Admin and User ? or one model User with cancan roles ? now I have one User model with roles but what with controllers, after user sign in he is redirected to home#inde
[11:00:40] masscrx: arup_r: why ?
[11:01:31] masscrx: arup_r: http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html
[11:01:39] arup_r: I mean validations check.. callbacks ( after save and before save) ihave
[11:01:51] sevenseacat: then you need to update each record individually and save it
[11:01:55] arup_r: update does it .. but update_all don't
[11:02:26] arup_r: but update takes SQL code like I can pass with update_all ?
[11:02:38] arup_r: No I think
[11:03:56] edwinvdgraaf: has joined #RubyOnRails
[11:04:34] microdex: has joined #RubyOnRails
[11:06:43] jeffmess: has joined #RubyOnRails
[11:07:07] DaniG2k: has joined #RubyOnRails
[11:12:57] arup_r: has joined #RubyOnRails
[11:12:57] MaDErroR123: has joined #RubyOnRails
[11:14:11] MaDErroR123: has joined #RubyOnRails
[11:16:23] emilkarl: has joined #RubyOnRails
[11:17:42] ruurd: has joined #RubyOnRails
[11:18:09] microdex: has joined #RubyOnRails
[11:18:51] eGGsha: has joined #RubyOnRails
[11:21:00] erich__: has joined #RubyOnRails
[11:21:23] pwnz0r: has joined #RubyOnRails
[11:21:40] darrencauthon: has joined #RubyOnRails
[11:23:07] yardenbar: has joined #RubyOnRails
[11:24:09] Hobogrammer: has joined #RubyOnRails
[11:26:22] DEA7TH_: has joined #RubyOnRails
[11:26:36] sinkensabe: has joined #RubyOnRails
[11:27:11] Anubix1: has joined #RubyOnRails
[11:28:35] Anubix1: Hi can somebody help me? I am creating a row in db table by form, but for one column i want to set default value 0. It can be done by hidden inpit in form with 0 value, but i think RoR will have more elegant solution.
[11:29:26] cochise: has joined #RubyOnRails
[11:30:56] DylanJ: Anubix1: set the default value in the database
[11:31:49] yashinbasement: has joined #RubyOnRails
[11:33:33] diegoviola: has joined #RubyOnRails
[11:35:24] ldnunes: has joined #RubyOnRails
[11:36:41] koos303: has joined #RubyOnRails
[11:36:46] aceRacer: ah the slience explains
[11:38:37] fighella: has joined #RubyOnRails
[11:39:54] _solomon: has joined #RubyOnRails
[11:40:07] schaerli: has joined #RubyOnRails
[11:41:36] _utah_: has joined #RubyOnRails
[11:42:44] terpo: has joined #RubyOnRails
[11:44:04] Anubix1: DylanJ: Yea thanks, easy and working :)
[11:47:59] _utah_: has joined #RubyOnRails
[11:49:55] k4nd4lf: has joined #RubyOnRails
[11:51:11] aceRacer: utah and fighella felt like swapping two variables w/o third variable
[11:51:22] _utah_: has joined #RubyOnRails
[11:57:01] mikecmpbll: has joined #RubyOnRails
[11:57:21] schaerli: has joined #RubyOnRails
[11:57:40] adre: has joined #RubyOnRails
[11:57:55] _utah_: has joined #RubyOnRails
[11:57:56] intinig: has joined #RubyOnRails
[11:58:06] jaequery: has joined #RubyOnRails
[11:59:14] doodlehaus: has joined #RubyOnRails
[12:02:30] fighella: has joined #RubyOnRails
[12:04:37] ruurd: has joined #RubyOnRails
[12:06:21] konsolebox: has joined #RubyOnRails
[12:06:27] Rubie: has joined #RubyOnRails
[12:06:42] jkamenik: has joined #RubyOnRails
[12:06:43] _utah_: has joined #RubyOnRails
[12:07:39] vigasdeep: has joined #RubyOnRails
[12:11:13] jaequery: has joined #RubyOnRails
[12:11:18] leslie: in ActiveRecord I can do where(created_at: from_date..to_date) and it'll do the right thing in a DB agnostic manner. Is there a way to select when the date is a particular month in the same manner or would I have to use an SQL statement?
[12:11:43] sp1rs: has joined #RubyOnRails
[12:11:46] leslie: say all posts where the month is February regardless of the year
[12:12:05] shyshy: has joined #RubyOnRails
[12:12:14] jeffmess: has joined #RubyOnRails
[12:13:02] heyts: has joined #RubyOnRails
[12:13:05] Hates_: has joined #RubyOnRails
[12:13:47] siemprefresco: has joined #RubyOnRails
[12:13:53] Criten: leslie: you'd probably have to throw in the sql for it
[12:13:55] ruurd: has joined #RubyOnRails
[12:13:58] Criten: month(date)
[12:14:03] Criten: luckily that's how most do it..
[12:14:27] eggoez: has joined #RubyOnRails
[12:14:32] leslie: yeah, I'll just do that, Criten. The exception is SQLite but that in itself is pretty unexceptional
[12:15:05] yuuvee: has joined #RubyOnRails
[12:15:20] Criten: I always run the same db in dev as i do in production
[12:15:28] eGGsha: has joined #RubyOnRails
[12:15:38] quazimodo: has joined #RubyOnRails
[12:15:55] leslie: same. we're on mysql right now but I'm trying to push towards postgres
[12:18:05] stantonnet: has joined #RubyOnRails
[12:18:26] GeissT: has joined #RubyOnRails
[12:18:44] microdex: has joined #RubyOnRails
[12:20:02] cochise: has joined #RubyOnRails
[12:22:04] leslie: I seem to have inherited some of the ugliest rails code I've ever seen. but maybe I just haven't seen enough bad code
[12:22:34] Criten: Some projects just get out of hand with feature creep
[12:22:40] Criten: we have some projects that only like a few months
[12:22:44] Criten: and they need to get done in < a week
[12:22:46] leslie: http://pastie.org/10298353 a sample of one controller
[12:22:50] Criten: and they are just rediculous
[12:22:51] rustymyers: has joined #RubyOnRails
[12:23:17] Criten: is that all in one action?
[12:23:25] leslie: yup. that's about 1/3 of the action
[12:23:38] Criten: lot of that could probably afford to be moved to the model
[12:23:38] leslie: whoever wrote it really loves SQL
[12:29:41] kham1: has joined #RubyOnRails
[12:31:10] livathinos: has joined #RubyOnRails
[12:32:45] axl_: has joined #RubyOnRails
[12:33:03] victortyau: has joined #RubyOnRails
[12:34:02] schaerli: has joined #RubyOnRails
[12:36:29] Hates_: yeah and don't do this: Country.find(:first,:conditions => "name = '#{params[:country]}'")
[12:37:06] benhuda: has joined #RubyOnRails
[12:37:23] michael_mbp: has joined #RubyOnRails
[12:37:34] Hates_: and I've got to work on worse. one project I'm on has a controller that's over 2500 lines long :P
[12:38:10] sankaber: has joined #RubyOnRails
[12:38:17] LoBoGoL: has joined #RubyOnRails
[12:38:21] LoBoGoL_: has joined #RubyOnRails
[12:38:46] ndrei: has joined #RubyOnRails
[12:38:59] ndrei_: has joined #RubyOnRails
[12:40:21] kidoz: has joined #RubyOnRails
[12:40:38] Criten: Hates_: I... don't even understand that
[12:40:47] LoBoGoL: has joined #RubyOnRails
[12:40:52] p1k: has joined #RubyOnRails
[12:47:31] jenrzzz: has joined #RubyOnRails
[12:48:32] _3by8: has joined #RubyOnRails
[12:49:54] edwinvdgraaf: has joined #RubyOnRails
[12:51:50] _3by8: I'm having difficulty understanding how an instance variable is being accessed. It's set up like so: attr_accessor :remember_token -- I get this part because I understand how attr_accessor works. What I don't get is this part of code in a method called "remember": update_attribute(:remember_digest, User.digest(remember_token)) -- what I'm struggling with is the use of remember_token. Shouldn't that be prefixed with an '@' charact
[12:53:13] sce_: has joined #RubyOnRails
[12:53:18] p1k: it's just shorthand for a getter and setter
[12:53:31] nickenchuggets: has joined #RubyOnRails
[12:53:31] nickenchuggets: has joined #RubyOnRails
[12:53:55] _3by8: p1k: which part?
[12:54:56] ndrei: has joined #RubyOnRails
[12:55:05] ramortegui: has joined #RubyOnRails
[12:56:11] diegorv: has joined #RubyOnRails
[12:56:44] edwinvdg_: has joined #RubyOnRails
[12:57:08] p1k: it's just like if you defined a def remember_token; @ remember_token; end; def remember_token=(val); @remember_token = remember_token; end
[12:57:36] Hates_: _3by8: http://ruby-doc.org/core-2.0.0/Module.html#method-i-attr_accessor
[12:58:40] DefV: _3by8: both are possible in this case
[12:58:47] p1k: *@remember_token=val i meant
[12:58:55] DefV: you could do User.digest(@remember_token)
[12:59:09] DefV: but using the remember_token accessor method gives you some advantages
[12:59:19] DefV: for example if you one day want to generate this as requested
[12:59:24] garrypolley: has joined #RubyOnRails
[12:59:29] DefV: you could just redefined remember_token as something else
[12:59:29] ndrei_: has joined #RubyOnRails
[13:01:00] p1k: is there a way to check if .changes have already been joined into a transaction?
[13:01:20] devdazed: has joined #RubyOnRails
[13:01:21] thomasfedb: has joined #RubyOnRails
[13:01:37] _3by8: Okay so apparently I don't understand attr_accessor like I thought I did but I guess it creates an accessor method with the same name as the symbol. Thanks for the help.
[13:01:55] _3by8: Thanks to everyone who chimed in.
[13:02:37] p1k: or is that not possible with the AR dirty model ?
[13:03:08] garrypolley: has joined #RubyOnRails
[13:03:45] arup_r: has joined #RubyOnRails
[13:04:04] madebymarkca: has joined #RubyOnRails
[13:04:42] Guest66988: has joined #RubyOnRails
[13:05:12] bruno-: has joined #RubyOnRails
[13:06:02] thomasfedb: sevenseacat, hollah
[13:06:23] sevenseacat: bonan vesperon
[13:06:50] p1k: what I mean is - is there a way to check which changes were already inserted with a .save/.save!, rather than all changes from before the current_transaction started
[13:07:24] ndrei: has joined #RubyOnRails
[13:07:38] ndrei_: has joined #RubyOnRails
[13:08:16] Scripore: has joined #RubyOnRails
[13:08:16] noodman: has joined #RubyOnRails
[13:10:31] DoubleMalt: has joined #RubyOnRails
[13:12:28] bungoman: has joined #RubyOnRails
[13:13:19] annlewis: has joined #RubyOnRails
[13:13:53] lala: has joined #RubyOnRails
[13:14:00] rokj: has joined #RubyOnRails
[13:14:29] hfp: has joined #RubyOnRails
[13:14:59] hfp_work: has joined #RubyOnRails
[13:15:41] rokj: when i start rails server on some project
[13:15:55] rokj: i get error like /usr/local/lib/ruby/gems/1.9/gems/bundler-1.6.3/lib/bundler/runtime.rb:34:in `block in setup': You have already activated i18n 0.7.0, but your Gemfile requires i18n 0.6.11. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
[13:16:09] rokj: is there a way i can handle this?
[13:16:25] intinig: has joined #RubyOnRails
[13:17:50] konsolebox: has joined #RubyOnRails
[13:18:22] Hates_: rokj: as the error says. try bundle exec rails s
[13:19:37] isjaylee: has joined #RubyOnRails
[13:19:43] microdex: has joined #RubyOnRails
[13:21:49] allcentury: has joined #RubyOnRails
[13:23:02] rokj: Hates_: thx!
[13:24:19] JoshL: has joined #RubyOnRails
[13:25:05] jerematic: has joined #RubyOnRails
[13:25:18] aceRacer: in ruby how to check if a day is 1.week.ago from today
[13:27:06] isjaylee: anyone here know react on rails? i'm trying to present an associated model's data but can't seem to figure out how to do it in JSX
[13:28:24] matcouto: has joined #RubyOnRails
[13:28:31] ruurd: has joined #RubyOnRails
[13:28:36] fighella: has joined #RubyOnRails
[13:29:08] Betray1st: has joined #RubyOnRails
[13:30:52] cornerma1: has joined #RubyOnRails
[13:31:39] Encapsulation: has joined #RubyOnRails
[13:32:07] broman: has joined #RubyOnRails
[13:32:31] nzst: has joined #RubyOnRails
[13:32:39] matcouto: has joined #RubyOnRails
[13:33:01] catcher: has joined #RubyOnRails
[13:33:06] broman: can someone help me? im new to rails... (3.2)... i created a model and a controller and i am trying to make a form using form_for but im getting the error "undefined method `aproveitamentos_path' for #<#<Class:0x00000003d32478>:0x000000075206c8>" ... what is this?
[13:33:18] shterrett: has joined #RubyOnRails
[13:33:20] rubyonrailed: has joined #RubyOnRails
[13:33:57] Cork: broman: what are you giving to the form_for?
[13:34:18] broman: Cork, <%= form_for(@aproveitamento) do |f| %>
[13:34:31] Cork: and that is an instance of the model?
[13:34:34] broman: in my new action on controller i have this @aproveitamento = Aproveitamento.new
[13:34:48] Palsson: has joined #RubyOnRails
[13:34:48] broman: if i do a <%= @aproveitamento %> i get an object
[13:34:54] Cork: have you created a resource routes for the form?
[13:35:06] broman: resources :aproveitamentos
[13:35:08] Cork: or rather the controller
[13:35:34] Cork: check rake routes in your system console
[13:35:41] _solomon: has joined #RubyOnRails
[13:36:34] shterrett: We are moving a rails application into an engine. When precompiling the assets, we???re getting an error that a sass variable is not defined in a particular sass partial. The sass partial is included in multiple top-level sass files that each define the variable which is referenced in the error. We???re using a Proc to determine which files should be precompiled, and it returns false for the sass partial in question, so it should only be compiled when
[13:36:35] shterrett: included in a top level file. Can anyone point me in the right direction for troubleshooting?
[13:36:40] broman: Cork, it's inside a module... it isnt aproveitamentos_path .. it is reitoria_aproveitamentos_path
[13:36:56] broman: what should i do to fix it?
[13:37:14] Cork: so form_for([@reitoria, @aproveitamentos])
[13:37:26] broman: Cork, thanks man! :)
[13:37:48] intinig: has joined #RubyOnRails
[13:38:14] broman: Cork, now i have a ndefined method `model_name' for NilClass:Class
[13:38:35] Cork: broman: @reitoria needs to be the nesting model instance :)
[13:38:44] Cork: so it was psudo code
[13:38:55] doodlehaus: has joined #RubyOnRails
[13:38:59] ruurd: has joined #RubyOnRails
[13:39:04] broman: Cork, i didn't followed :(.. what should i read to understand this?
[13:39:04] Miesco: has joined #RubyOnRails
[13:39:09] allcentury: has joined #RubyOnRails
[13:39:20] sp1rs: has joined #RubyOnRails
[13:39:26] Cork: broman: for form_for to build the path it needs to get both the parent and child module
[13:39:30] riotjones: has joined #RubyOnRails
[13:39:59] broman: Cork, hmm... thank you again i will look up some things here
[13:40:26] balr0g: has joined #RubyOnRails
[13:41:39] Miesco: My 'get' functions aren't working in routes.config in my production nginx server. How do I ask for help?
[13:42:09] broman: Cork, well.. the reitoria thing is just a path issue... how can i workaround through this?
[13:42:25] shterrett: @broman @Cork: You can also pass a `url: <path>` parameter to form_for to specifiy the path to post to. This may be easier if the namespace is a pure module, and there is no object instance that nests (so form_for [@outer, @inner] won???t work)
[13:42:27] qejk: has joined #RubyOnRails
[13:42:30] mary5030: has joined #RubyOnRails
[13:42:47] Cork: broman: two ways either form_for([:retoria, @other_variable])
[13:42:58] Cork: or form_for(reitoria_aproveitamentos_path(@other_varaible))
[13:43:08] Cork: you choice what you find more readable
[13:43:21] Cork: shterrett: ya, but it is better to try to stay with the restful urls
[13:43:35] broman: Cork, what other variable??
[13:43:42] broman: shterrett, what would be the full syntax to that?
[13:43:48] Cork: i forgot, but i think it was @aproveitamentos right?
[13:44:07] Cork: broman: form_for(@aproveitamentos, { url: "" })
[13:44:21] Cork: but that basically hardcodes the url
[13:45:21] shterrett: You can also form_for([:admin, @post]) if it???s a pure namespace; that???s cleaner than hardcoding the url
[13:45:41] Cork: ya, that is what i suggested a bit up :)
[13:46:40] isjaylee: has left #RubyOnRails: ()
[13:46:54] broman: <%= form_for(reitoria_aproveitamentos_path(@aproveitamento)) do |f| %> worked! :D
[13:47:48] broman: another question i have... in this aproveitamentos model i have a foreign key... how can i use a select with the data from the other model?
[13:48:12] Cork: broman: join(:foregen_key)
[13:48:22] Cork: or rather foregen_key_model
[13:48:25] broman: in the form_form?
[13:48:34] Cork: you said in the select
[13:48:35] broman: i want a select box form
[13:48:36] elmhouse: has joined #RubyOnRails
[13:48:48] Cork: you would have to qurey the data and build an array
[13:49:10] broman: already have the @carreiras array
[13:49:22] xcesariox: has joined #RubyOnRails
[13:49:50] paulcsmith: has joined #RubyOnRails
[13:50:08] broman: is there any helper method to do this? or will I have to hardcode the select form?
[13:50:52] broman: Cork, <%= select_tag "carreira", options_from_collection_for_select(@carreira, "id", "nome") %> ! :D
[13:50:58] rustymye_: has joined #RubyOnRails
[13:51:10] Cork: Model.join(:third_party).where("third_partyies.name = soemthing").pluck("models.id, third_parties.name")
[13:51:16] mary5030: has joined #RubyOnRails
[13:51:16] Cork: for example
[13:51:32] Cork: broman: then @carreira isn't an array
[13:51:35] darrencauthon: has joined #RubyOnRails
[13:51:36] brazenbraden: has joined #RubyOnRails
[13:52:15] Cork: its a query chain or a.. don't remeber the name
[13:52:19] Cork: but it is active record
[13:52:22] Cork: not a straight array
[13:52:25] intinig: has joined #RubyOnRails
[13:52:38] DefV: ActiveRelation
[13:52:45] DefV: ActiveRecord::Relation, even
[13:52:50] devdazed: has joined #RubyOnRails
[13:53:51] broman: i have another question :D.. my form failed becouse of the routes
[13:53:55] broman: with my resources :aproveitamentos
[13:54:06] broman: it said: No route matches [POST] "/reitoria/aproveitamentos/new"
[13:54:13] Miesco: How come my log/development.log is only logging 200 SUCCESS requests? Shouldn't it be logging 404s?
[13:54:36] broman: how can there be a /new route for get but none for /new post?
[13:54:59] Cork: broman: cause post is /reitoria/aproveitamentos
[13:55:06] Cork: check up on restful
[13:55:30] broman: I did not understood
[13:55:37] chouhoulis: has joined #RubyOnRails
[13:55:50] Cork: http://guides.rubyonrails.org/routing.html
[13:55:56] Cork: POST /photos photos#create create a new photo
[13:56:02] Cork: GET /photos/new photos#new
[13:56:28] broman: should't resources :aproveitamentos take care of this?
[13:56:41] broman: *shouldn't
[13:56:49] Cork: well you're getting the wrong url
[13:56:54] Cork: you get the new url not the post url
[13:57:08] Cork: meaning you get it for new and not post
[13:57:13] broman: i have GET new url but not POST new url
[13:58:03] Cork: ya, you shouldn't have one
[13:58:19] Cork: but you shouldn't do a post towards /new either
[13:58:25] schaerli: has joined #RubyOnRails
[13:58:32] garrypolley: has joined #RubyOnRails
[13:58:33] broman: so i need to add this route then?
[13:58:41] Cork: you need to change where you post
[13:58:47] Cork: cause you're posting to the wrong url
[13:59:02] isjaylee: has joined #RubyOnRails
[13:59:17] ruurd: has joined #RubyOnRails
[13:59:20] DefV: broman: AproveitamentosController#create is called by POST to /reitoria/aproveitamentos
[13:59:31] aceRacer: I am trying to check if a date is betwen two dates like (14.days.from_now..7.days.from_now).cover?(OfferUser.first.offer.shipment_deadline), where the values are Fri, 31 Jul 2015 08:58:45 CDT -05:00, Fri, 24 Jul 2015 08:58:50 CDT -05:00 and Mon, 27 Jul 2015 23:59:59 CDT -05:00 respectively
[13:59:36] aceRacer: but it returns false
[13:59:40] _utah_: has joined #RubyOnRails
[14:00:09] Grundell: has joined #RubyOnRails
[14:01:16] isjaylee: has left #RubyOnRails: ()
[14:01:41] shterrett: @aceRacer what happens if you reverse the order of the endpoints of the range? (7.days.from_now..14.days.from_now) ?
[14:01:53] shinnya: has joined #RubyOnRails
[14:02:03] broman: yeah.. i still don't follow :(
[14:02:15] jamiely: has joined #RubyOnRails
[14:02:24] Cork: broman: it is how restful works
[14:02:47] Cork: its explained on the page i linked
[14:03:02] broman: No route matches [POST] "/reitoria/aproveitamentos/new"
[14:03:27] Cork: broman: read http://guides.rubyonrails.org/routing.html
[14:03:44] bungoman: has joined #RubyOnRails
[14:03:46] aceRacer: oh sorry I was checking opposite
[14:03:48] mike___1234: has joined #RubyOnRails
[14:04:06] Cork: anyone know how to get access to url_for from outside normal rails classes?
[14:04:08] Miesco: How do I get an error console in production (nginx/passenger)?
[14:04:21] Cork: i'm writing a plugin but need to generate some urls
[14:04:41] Cork: Miesco: same as normal, it isn't part of passenger
[14:04:42] garrypolley: has joined #RubyOnRails
[14:04:49] Cork: rails c production
[14:04:52] shterrett: @Cork: include Rails.application.routes.url_helpers we use this in presenters
[14:04:58] Miesco: Cork: I mean on the webpage
[14:05:19] Miesco: Cork: If I get an error like a 404 it will show the error console in my browser
[14:05:39] Miesco: Well I want it to show the error console in my browser
[14:05:40] Cork: Miesco: no you would have to tail the production.log
[14:05:57] Cork: there isn't an "error console"
[14:06:42] DEA7TH_: has joined #RubyOnRails
[14:06:48] dopie: has joined #RubyOnRails
[14:07:10] broman: hardcoded the address :(... at least it will work :D
[14:07:31] Anubix1: Hi guys i am using namespaces admin for my dogs namespace :admin do resources :dogs end so i am going to admin by url http://localhost:3000/admin/dogs where i can create new dog, but after creating dog form redirect me to http://localhost:3000/dog
[14:07:47] Miesco: Cork: I want this on my nginx server: http://i.imgur.com/4aSwyfG.png
[14:07:55] Miesco: See that console at the bottom?
[14:08:05] Cork: Miesco: that is disabled in production
[14:08:06] Anubix1: I am using <%= form_for([:admin, @dog] but it still dont redirect me to admin section
[14:08:14] Cork: you would leak the routes if it wasn't
[14:08:15] Trefex: has joined #RubyOnRails
[14:08:30] Miesco: Cork: Well I can't get it in development either on my nginx server
[14:08:46] Cork: Miesco: should work just fine
[14:09:14] Hates_: Miesco: are you sure you're running in development in nginx?
[14:09:17] shterrett: @Anubix1 you???ll need to redirect within the create action in the Admin::DogsController
[14:09:18] Cork: shterrett: damn... it loses the current host :/
[14:09:29] Miesco: Cork: I get it on my development environment on the rails server, but not in the development environment in nginx.
[14:09:43] Anubix1: shterrett: Yea i am using it now but it doenst look so cool
[14:09:45] shterrett: @Cork - we saw something like that with mailers; let me grab some code
[14:09:51] chouhoulis: has joined #RubyOnRails
[14:10:16] sshuff: has joined #RubyOnRails
[14:10:21] Miesco: Hates_: Yes. I did this: <%= ENV['PASSENGER_APP_ENV'] %> on my home page
[14:10:22] Anubix1: shterrett: I still think that there is way to use good url in form_for but dont know why :)
[14:10:40] Miesco: Hates_: It says development, and its from my nginx server
[14:10:47] Hates_: Miesco: perhaps you have nginx setup to handle error status from the app
[14:11:01] tvw: has joined #RubyOnRails
[14:11:21] Hates_: Miesco: why do you want to run the app in nginx?
[14:11:34] shterrett: @Anubix1 the form is supposed to point to the create action. After that action is executed, the create action can then send you where you want to go (probably :show). The form is not supposed to handle the actual end state after the create action is complete.
[14:11:55] Miesco: Hates_: Because its a real web server
[14:12:20] shterrett: @Cork we have this method in our presenter so that the host is available. It???s a bit hacky, but it works:
[14:12:21] shterrett: def self.default_url_options
[14:12:21] shterrett: Rails.application.config.action_mailer.default_url_options
[14:12:38] Cork: ah. cool
[14:12:47] shterrett: quite welcome
[14:12:54] Hates_: Miesco: fair enough, still can't see a point
[14:12:57] devdazed: has joined #RubyOnRails
[14:13:04] fighella: has joined #RubyOnRails
[14:13:28] Anubix1: shterrett: Well but i have show in my admin dog controller with right view
[14:13:36] broman: Can't mass-assign protected attributes: utf8, authenticity_token, carreira, aproveitamento, commit, action, controller <--- how can i fix this?
[14:13:54] Miesco: Ah I fixed it
[14:13:55] Anubix1: shterrett: So i dont know why it is using front end DOG controller
[14:13:58] Hates_: broman: strong parameters
[14:14:02] Miesco: Hates_: Thanks!
[14:14:08] Anubix1: shterrett: And no admin dog controller with right url
[14:14:09] broman: Hates_, rails 3.2?
[14:14:11] Hates_: Miesco: what was the problem?
[14:14:32] Hates_: broman: attr_accessible :)
[14:14:36] shterrett: @Anubix1 make sure the redirect in create is to admin_dog_path(@dog)
[14:14:45] Miesco: location / { try_files $uri $uri/ =404; } was in nginx's server setting!
[14:14:47] terpo: has joined #RubyOnRails
[14:14:49] broman: Hates_, ty
[14:14:52] Hates_: broman: np
[14:15:10] Miesco: Hates_: I have no idea what that does
[14:15:17] [H]unt3r: has joined #RubyOnRails
[14:15:34] OS-14813: has joined #RubyOnRails
[14:15:40] Hates_: Miesco: It'll try the routes and if non work it'll just go to the 404 definition
[14:16:21] Miesco: Hates_: Will try what routes?
[14:16:33] Hates_: Miesco: http://nginx.org/en/docs/http/ngx_http_core_module.html#try_files
[14:16:41] Anubix1: shterrett: And this is best practice solution?
[14:16:52] AzaToth: has joined #RubyOnRails
[14:17:14] zorak8: has joined #RubyOnRails
[14:17:20] shterrett: @Anubix1 new -> POST create -> redirect show? yes
[14:17:57] Miesco: Hates_: Wait... is that nginx's way to handle static files?
[14:18:04] garrypolley_: has joined #RubyOnRails
[14:18:32] Anubix1: shterrett: I understand it now! Thanks
[14:18:51] Miesco: Hates_: Well not static, I mean is it nginx's way to process the URI as a file system?
[14:19:16] Anubix1: shterrett: Well but for what is :admin in form_for ? form_for([:admin, @webcam]
[14:19:24] MaDErroR123: has joined #RubyOnRails
[14:19:40] _utah_: has joined #RubyOnRails
[14:19:45] Anubix1: shterrett: Ah that means it use admin controller
[14:19:53] shterrett: Anubix1: that namespaces the route. So that will POST to /admin/webcams/:id
[14:20:14] Anubix1: shterrett: Cool, thanks :) now i understand
[14:20:29] microdex: has joined #RubyOnRails
[14:20:43] Anubix1: I was searching this solution for half of a day and found nothing :/
[14:21:37] stantonnet: has joined #RubyOnRails
[14:21:54] bahar: has joined #RubyOnRails
[14:22:23] broman: Im getting the error "Can't mass-assign protected attributes: utf8" ... when i try to add utf8 to attr_acessible it gives me the error "unknown attribute: utf8"
[14:22:40] nya: has joined #RubyOnRails
[14:22:51] shterrett: Anubix1: no problem; you???re welcome
[14:22:56] Rubie: has joined #RubyOnRails
[14:23:39] werelivinginthef: has joined #RubyOnRails
[14:23:44] elmhouse: has joined #RubyOnRails
[14:24:55] Anubix1: has left #RubyOnRails: ()
[14:26:40] momomomomo: has joined #RubyOnRails
[14:27:18] intinig: has joined #RubyOnRails
[14:27:54] juanpaucar: has joined #RubyOnRails
[14:28:04] bmurt: has joined #RubyOnRails
[14:28:31] garrypolley: has joined #RubyOnRails
[14:29:19] garrypolley: has joined #RubyOnRails
[14:29:27] bungoman_: has joined #RubyOnRails
[14:30:07] DaniG2k: has joined #RubyOnRails
[14:30:13] bmurt: has joined #RubyOnRails
[14:30:23] _utah_: has joined #RubyOnRails
[14:30:38] OS-14813: has joined #RubyOnRails
[14:30:43] Cork: shtirlic: hmm, didn't work
[14:30:51] Cork: i only get nil from that config
[14:31:02] OS-14813: hey guys, does controller test reuse sessions ?
[14:31:04] Cork: so i still can't find a way to get the current host :/
[14:32:20] rustymyers: has joined #RubyOnRails
[14:32:38] shelby: has joined #RubyOnRails
[14:32:53] kies^: has joined #RubyOnRails
[14:35:05] DoubleMalt: has joined #RubyOnRails
[14:38:01] rubyonrailed: has joined #RubyOnRails
[14:39:37] sarink: has joined #RubyOnRails
[14:40:13] Maletor: has joined #RubyOnRails
[14:41:28] garrypolley: has joined #RubyOnRails
[14:42:37] oflannabhra: has joined #RubyOnRails
[14:42:50] marr: has joined #RubyOnRails
[14:44:35] earthquake: has joined #RubyOnRails
[14:46:10] sshuff: has joined #RubyOnRails
[14:46:14] Lightsword: has joined #RubyOnRails
[14:48:36] umgrosscol: has joined #RubyOnRails
[14:49:02] ndrei: has joined #RubyOnRails
[14:49:02] ndrei_: has joined #RubyOnRails
[14:50:51] bungoman: has joined #RubyOnRails
[14:50:54] tubbo: Cork: you have to set it first
[14:51:12] chouhoul_: has joined #RubyOnRails
[14:51:16] Cork: tubbo: no i have a class that i'm calling into from a controller
[14:51:22] tubbo: like i have to do config.action_mailer.default_url_options = { host: 'localhost:3000' } when I want to use Devise so it can build the links properly
[14:51:31] Cork: and as far as i can tell from digging through the net i can't get access to the request object
[14:51:34] tubbo: Cork: well then you probably don't want the action_mailer host, right? :)
[14:51:37] Cork: unless the controller gives it to me
[14:51:42] ChadyG_: has joined #RubyOnRails
[14:51:49] tubbo: Cork: you probably didn't look very far, because the `request` method returns the current request object
[14:51:52] tubbo: very useful
[14:51:55] Cork: i want the request object from the controller
[14:52:07] Cork: tubbo: ya, except i don't have access to it
[14:52:11] disgrntld: has joined #RubyOnRails
[14:52:14] Cork: unless the controller forwards it to me
[14:52:15] tubbo: Cork: in a controller? you most certainly do.
[14:52:20] tubbo: it's a method in ActionController
[14:52:26] tubbo: unless you're doing some fun shit
[14:52:27] Cork: i'm not in the controller
[14:52:33] Cork: i'm in separate class
[14:52:37] tubbo: Cork | tubbo: no i have a class that i'm calling into from a controller
[14:52:44] krz: has joined #RubyOnRails
[14:52:59] Cork: _into_ from a controller
[14:53:03] Cork: that is true
[14:53:03] tubbo: Cork: you instantiate that class in a controller, right?
[14:53:07] reptilain_brain: has joined #RubyOnRails
[14:53:09] tubbo: why can't you just pass the request
[14:53:18] Cork: that is what i just said
[14:53:22] tubbo: or maybe just pass `self` and that'll give your class the whole controller
[14:53:25] Cork: and i would have prevered if i didn't have to
[14:53:34] Cork: i expected it to be globally accessable somewhere
[14:53:38] Cork: like in Rails or something
[14:53:45] tubbo: Cork: globals are bad, mmk?
[14:53:58] Cork: Rails.application.current_request?
[14:54:03] Cork: no i don't think it is
[14:54:12] tubbo: Cork: there are very few globals in a rails app...that would prevent it from being thread-safe
[14:54:30] tubbo: Cork: there could be two current requests.
[14:54:41] reptilain_brain: Hey guys - in a scenario where I have Live controller + heartbeat hack to close open connections (http://stackoverflow.com/questions/18970458/redis-actioncontrollerlive-threads-not-dying) - how can I avoid closing connection and sending ???heartbeat??? to client instead of data that client is waiting for?
[14:54:41] tubbo: if you are using a multi-threaded ruby and server
[14:54:44] Cork: sure, but that would be per request so...
[14:55:05] microdex: has joined #RubyOnRails
[14:55:09] tubbo: in a multi-threaded world, the same set of RAM is shared. so that value would get changed for *everyone*, not just the current request.
[14:55:13] jkamenik: has joined #RubyOnRails
[14:56:00] tubbo: Cork: but yeah, Rails (and Ruby) stay away from global vars because it's been proven that they are not sustainable in a lot of cases. plus they're unnecessary.
[14:56:03] Cork: tubbo: the problem is that i wasn't instansiating the class before
[14:56:23] Cork: i only used the class to create a namespace for shared helper functions
[14:56:49] Cork: (def self.create_cumborsume_query_url_for_external_service)
[14:57:17] tubbo: Cork: why are you using a class to make a namespace? not that there's anything wrong with that, but Ruby by default makes "namespaces" into modules, so it's a little unusual you'd use a class (implying the thing has state) for this purpose.
[14:57:39] Cork: hmm namespace?
[14:57:42] tubbo: classes for everything? long method names? youuuuu might be a java developer ;)
[14:57:46] tubbo: which is a good thing btw
[14:57:50] Cork: cause i dind't know of its existance?
[14:58:08] Cork: tubbo: the function name was just a psudo function :)
[14:58:10] tubbo: no what i mean is that, if you do something like `class MyNamespace::SomeClass`, MyNamespace is now a module
[14:58:34] Cork: ya, that is what i'm doing
[14:58:49] tubbo: ah, that *might* be why you're confused a bit
[14:58:54] smathy: tubbo, I don't think that's right.
[14:58:56] Cork: except i have module MyNamespace; class SomeClass1; end class SomeClass2; end end
[14:59:11] earthquake: has joined #RubyOnRails
[14:59:53] tubbo: i just tried that and got a NameError haha
[15:00:34] tubbo: Cork: so you are defining a module
[15:01:14] tubbo: Cork: regardless, this all stemmed from the idea of having a global for the current request, which was not desired for a lot of reasons.
[15:01:23] Cork: tubbo: https://pastebin.mozilla.org/8839823
[15:01:34] tubbo: you still get access to the current request in the controller instance, it's very easy to just pass that to your service object..
[15:01:59] tubbo: yep, that's probably what i'd do
[15:02:42] smathy: OS-14813, add the definitions of your fake_*_auth methods to your gist (or a new gist)
[15:03:04] smathy: OS-14813, !gist-usage - also read this please so we can get some proper syntax highlighting.
[15:03:04] helpa: OS-14813: How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.markdown
[15:04:41] Trefex: has joined #RubyOnRails
[15:05:03] paulcsmith: has joined #RubyOnRails
[15:06:29] reptilain_brain: Hi guys - in a scenario where I have Live controller + heartbeat hack to close stale connections (http://stackoverflow.com/questions/18970458/redis-actioncontrollerlive-threads-not-dying) - how can I avoid closing connection with ???heartbeat??? sent to client instead of actual data that client is waiting for?
[15:06:44] Miesco: If I am in my app directory and use bin/rake, is that the same as using 'bundle exec rake'?
[15:06:53] Travis-42: has joined #RubyOnRails
[15:07:29] garrypolley: has joined #RubyOnRails
[15:09:36] treehau55: has joined #RubyOnRails
[15:09:59] r0nin: has joined #RubyOnRails
[15:11:34] hurrrtin: has joined #RubyOnRails
[15:13:49] paulcsmith: has joined #RubyOnRails
[15:13:58] Cork: ah, i'll just forward the url from the controller... this gets way to messy
[15:14:14] r0nin_: has joined #RubyOnRails
[15:14:22] Miesco: So essentially, 'bundle exec' makes your GEM_PATH as the library path to require files?
[15:14:36] mikecmpbll: often when I'm writing a gem that uses activerecord, i will use the sqlite memory database to run tests against by loading a database config like: sqlite3:\n adapter: sqlite3\n database: ":memory:"
[15:14:46] earthquake: has joined #RubyOnRails
[15:14:53] mikecmpbll: anybody know how I could define two seperate :memory: databases?
[15:15:03] hurrrtin: Hey guys, how can I set up a route that would go to an action that is a parameter? i.e., match ('foo/bar') => 'some##{params[:action])'
[15:15:26] mikecmpbll: or could it be as simple as writing another with a different name .. hmm
[15:15:28] mikecmpbll: let me test.
[15:16:48] intinig: has joined #RubyOnRails
[15:17:30] willywos: has joined #RubyOnRails
[15:17:38] Hates_: hurrrtin: something like this I believe, but you're exposing yourself by doing so, not really a good idea match "foo/:action", controller: 'some'
[15:17:38] umgrosscol: has joined #RubyOnRails
[15:17:51] chouhoulis: has joined #RubyOnRails
[15:17:58] richipargo: has joined #RubyOnRails
[15:17:59] Hates_: hurrrtin: not generally a good idea :)
[15:18:25] hurrrtin: @Hates_: I know. It's a temporary thing for legacy.
[15:18:40] Hates_: hurrrtin: ahhh :) give that a go
[15:19:14] Papierkorb: has joined #RubyOnRails
[15:19:22] hurrrtin: Hates_: So, :action would reference a parameter?
[15:20:03] Hates_: hurrrtin: http://guides.rubyonrails.org/routing.html#bound-parameters
[15:20:32] r0nin: has joined #RubyOnRails
[15:20:39] Hates_: hurrrtin: :action is a special symbol
[15:21:11] bronson: has joined #RubyOnRails
[15:21:43] mikecmpbll: man, database_rewinder is all kinds of awesome.
[15:22:51] hurrrtin: Hates_: I'm not sure if that's exactly what I mean. What I need to do is basically redirect /foo/bar?name=joe to /oof/joe.
[15:23:56] Hates_: hurrrtin: ahhhh I see :)
[15:24:14] bungoman: has joined #RubyOnRails
[15:24:56] hurrrtin: Hates_: Probably gonna need to go custom for that huh?
[15:26:27] Hates_: hurrrtin: so the name parameter is the name of the action?
[15:26:36] Daquan: has joined #RubyOnRails
[15:28:06] r0nin_: has joined #RubyOnRails
[15:28:13] erich: has joined #RubyOnRails
[15:30:11] bruno-: has joined #RubyOnRails
[15:30:55] Hates_: hurrrtin: I would probably have two routes, one that normalises the route with a redirect and a second that actually handles the request
[15:32:50] Hates_: hurrrtin: https://gist.github.com/Hates/c401a24c68dbbc05c3db
[15:32:58] Hates_: hurrrtin: there's probably a better way
[15:34:26] schaerli: has joined #RubyOnRails
[15:34:56] dman777_alter: has joined #RubyOnRails
[15:35:15] jkamenik: has joined #RubyOnRails
[15:35:55] arup_r: has joined #RubyOnRails
[15:36:16] dman777_alter: http://dpaste.com/1RKKYEX why does this give me uninitialized constant V1::DeviceController?
[15:37:16] hurrrtin: Hates_: Something like that was my failsafe plan. Thanks for your help!
[15:39:24] seank_: has joined #RubyOnRails
[15:39:43] Hates_: dman777_alter: your controller has to be namespaced like your routes
[15:44:28] dman777_alter: Hates_: hmm...do you mean like API::V1::DeviceControllerController < ApplicationController?
[15:44:51] Hates_: dman777_alter: yeah
[15:45:00] aznloren: has joined #RubyOnRails
[15:45:30] Hates_: dman777_alter: check your rake routes and it will tell you what it's looking for
[15:46:02] r0nin: has joined #RubyOnRails
[15:46:38] jkamenik: has joined #RubyOnRails
[15:46:46] joelataylor: has joined #RubyOnRails
[15:47:47] r0nin: has joined #RubyOnRails
[15:48:50] Moeh: has joined #RubyOnRails
[15:49:55] Moeh: What would be the recommended way to get the type of a variable. I am looking for a gem that ideally would support something like: get_type_of(var) and the output would be "datetime" / "boolena" / "currency" etc
[15:51:12] dman777_alter: Hates_: hmm.... rake routes shows api/v1/device#index POST /api/v1/device(.:format)
[15:51:24] dman777_alter: Not sure why it's counting it as a POST
[15:51:51] Hates_: dman777_alter: well you should have a load for that resource
[15:52:04] aznloren: has joined #RubyOnRails
[15:52:41] dman777_alter: Hates_: But in my controller I am not requreing a get that I can see http://dpaste.com/1RKKYEX ... I am using respond_to
[15:53:07] Hates_: dman777_alter: http://guides.rubyonrails.org/routing.html#resources-on-the-web
[15:53:39] dman777_alter: Hates_: ah...thanks
[15:53:43] Hates_: dman777_alter: you're defined resources :device which will give you all the CRUD routes
[15:53:50] loc22: has joined #RubyOnRails
[15:54:05] bungoman: has joined #RubyOnRails
[15:54:45] mikecmpb_: has joined #RubyOnRails
[15:54:48] r0nin_: has joined #RubyOnRails
[15:57:46] treehau55: hello all, I have a lookup endpoint on my rails app that takes a users id and does a search and returns json. I have a problem however when a user has a dot intheir name, such as j.doe, I realize you can use constraints and have tried constraints: { id: /.*/ } to match one dot, with success, but it doesnt work for 2 dots however. Anyone know how to get around this?
[15:59:37] jonee: has joined #RubyOnRails
[15:59:56] Hates_: has joined #RubyOnRails
[16:00:38] dman777_alter: Hates_: looking at http://guides.rubyonrails.org/routing.html#resources-on-the-web shouldn't foo#index default to GET? Mine seems to default to POST
[16:00:47] edwinvdgraaf: has joined #RubyOnRails
[16:01:42] towski_: has joined #RubyOnRails
[16:01:46] momomomomo: has joined #RubyOnRails
[16:03:05] lindii_: has joined #RubyOnRails
[16:03:49] edwinvdg_: has joined #RubyOnRails
[16:04:05] abuzze: has joined #RubyOnRails
[16:04:31] abuzze: has joined #RubyOnRails
[16:06:08] edwinvdgraaf: has joined #RubyOnRails
[16:06:55] r0nin: has joined #RubyOnRails
[16:07:24] rustymye_: has joined #RubyOnRails
[16:08:51] eminencehc_: has joined #RubyOnRails
[16:09:04] poli: has joined #RubyOnRails
[16:09:36] jerematic: has joined #RubyOnRails
[16:10:22] arBmind1: has left #RubyOnRails: ()
[16:10:45] arBmind: has joined #RubyOnRails
[16:12:37] mwlang: has left #RubyOnRails: ()
[16:12:48] mwlang: has joined #RubyOnRails
[16:13:22] nickenchuggets: has joined #RubyOnRails
[16:13:22] nickenchuggets: has joined #RubyOnRails
[16:13:49] garrypolley: has joined #RubyOnRails
[16:15:18] [Butch]: has joined #RubyOnRails
[16:18:53] r0nin: has joined #RubyOnRails
[16:20:13] edwinvdg_: has joined #RubyOnRails
[16:20:19] bricker: has joined #RubyOnRails
[16:20:45] rogue_koder: has joined #RubyOnRails
[16:20:59] Axy: has joined #RubyOnRails
[16:21:37] djbkd: has joined #RubyOnRails
[16:22:02] DoubleMalt: has joined #RubyOnRails
[16:22:19] bronson: has joined #RubyOnRails
[16:25:21] seank_: has joined #RubyOnRails
[16:25:26] kham1: has joined #RubyOnRails
[16:26:36] Exuma: has joined #RubyOnRails
[16:27:03] oflannabhra: has joined #RubyOnRails
[16:30:12] DEA7TH_: has joined #RubyOnRails
[16:31:35] Mia: has joined #RubyOnRails
[16:31:51] benlieb: has joined #RubyOnRails
[16:33:26] mikecmpbll: has joined #RubyOnRails
[16:33:54] baweaver: has joined #RubyOnRails
[16:35:51] bahar: has joined #RubyOnRails
[16:36:34] konsolebox: has joined #RubyOnRails
[16:37:58] werelivinginthef: has joined #RubyOnRails
[16:38:11] nateberkopec: has joined #RubyOnRails
[16:38:41] Zarthus: has joined #RubyOnRails
[16:38:59] arup_r: How should I load all directories inside `lib` recursively ?
[16:39:52] k4nd4lf: has joined #RubyOnRails
[16:40:04] r0nin: has joined #RubyOnRails
[16:40:33] arup_r: I have this `config.autoload_paths += %W(#{config.root}/lib)` in my application.rb but it is not loading sub directories files
[16:41:25] willywos: config.autoload_paths += Dir["#{config.root}/lib/**/"] ?
[16:42:04] gambl0re: has joined #RubyOnRails
[16:42:27] arup_r: willywos, so this answer is misleading? http://stackoverflow.com/a/19650564/2767755 :(
[16:42:48] arup_r: I used the accepted answer.. and it didn't work for me..
[16:43:08] Rubie: has joined #RubyOnRails
[16:43:10] jkamenik: has joined #RubyOnRails
[16:44:31] chouhoul_: has joined #RubyOnRails
[16:44:45] bahar: hello Rails pros! Is there a way I can convert human-inputted time of day (e.g., 8:00am) to a standardized time format in Rails. I don't think I can use strftime for that
[16:44:57] jkamenik: has joined #RubyOnRails
[16:45:19] pontiki: bahar: have a look at the chronic gem, maybe? it does fuzzy time stuff
[16:45:24] Exuma: has joined #RubyOnRails
[16:46:01] Axy: has joined #RubyOnRails
[16:46:02] willywos: @arup_r do you have the direectory structure like lib/dir1/dir2/ruby_file.rb?
[16:46:53] willywos: oh ok so yeah that probably wouldn't work
[16:47:49] ledestin: has joined #RubyOnRails
[16:47:50] arup_r: means the SO answer..
[16:48:45] Maletor: has joined #RubyOnRails
[16:49:01] rustymyers: has joined #RubyOnRails
[16:49:10] bahar: pontiki: Chronic.parse("8:00am")
[16:49:11] bahar: => 2015-07-17 08:00:00 -0400
[16:49:17] bahar: I'm looking more for 08:00:00 -0400
[16:49:20] n008f4g_: has joined #RubyOnRails
[16:49:43] pontiki: well, right, then you can just use the time parts
[16:50:26] DoubleMalt: has joined #RubyOnRails
[16:50:41] Mia: has joined #RubyOnRails
[16:50:41] Mia: has joined #RubyOnRails
[16:51:05] cytoskeletor: has joined #RubyOnRails
[16:51:32] dc1: has joined #RubyOnRails
[16:51:47] jliberman: has joined #RubyOnRails
[16:52:03] pontiki: that's easy enough to deal with once you've got it parsed, isn't it?
[16:52:22] Mo: has joined #RubyOnRails
[16:52:29] garrypolley: has joined #RubyOnRails
[16:52:36] bahar: extra steps, I guess
[16:52:40] bahar: thanks pontiki !
[16:52:49] pontiki: fewer than building your own fuzzy parser :)
[16:53:06] cytoskeletor: I have a way for users to upload a document but I'd like them to only have one of a particular file I have defined. If they upload a different file it should replace the previous. How would you start going about this?
[16:54:23] LateralOctober: has joined #RubyOnRails
[16:54:34] Shidash: has joined #RubyOnRails
[16:54:50] jobewan: has joined #RubyOnRails
[16:54:54] bahar: Chronic.parse("8:00am").strftime("%H:%M %p")
[16:54:55] bahar: => "08:00 AM"
[16:54:56] bahar: there we go
[16:55:17] paulcsmith: has joined #RubyOnRails
[16:55:21] balr0g: has joined #RubyOnRails
[16:55:39] DEA7TH_: has joined #RubyOnRails
[16:55:46] arup_r: willywos, your suggestion didn't load files under lib/dir only which was working previously with the SO answer. But SO answer not loading files under subdirectories.
[16:56:41] edwinvdgraaf: has joined #RubyOnRails
[17:01:01] smathy: cytoskeletor, just present the edit form to them, and the new file they submit will overwrite the existing one. This is simple/obvious, what am I missing here?
[17:01:06] volsus: has joined #RubyOnRails
[17:01:45] lala: has joined #RubyOnRails
[17:02:42] relix: has joined #RubyOnRails
[17:04:45] disperso: has joined #RubyOnRails
[17:05:21] DEA7TH_: has joined #RubyOnRails
[17:06:06] bricker: Did Chronic ever fix that DST bug where it would report the wrong time if you were crossing DST boundary?
[17:06:10] bricker: I had to stop using Chronic because of that
[17:06:37] cochise: has joined #RubyOnRails
[17:06:53] mikeric: has joined #RubyOnRails
[17:07:13] jliberman: has left #RubyOnRails: ()
[17:07:20] jliberman: has joined #RubyOnRails
[17:07:31] momomomomo: has joined #RubyOnRails
[17:07:44] bricker: lol nope https://github.com/mojombo/chronic/issues/147
[17:07:50] bricker: coming up on 3 years
[17:10:13] jliberman: has left #RubyOnRails: ("Leaving")
[17:10:14] maletor_: has joined #RubyOnRails
[17:10:17] jliberman: has joined #RubyOnRails
[17:11:23] jliberman: has left #RubyOnRails: ("Leaving")
[17:11:27] jliberman: has joined #RubyOnRails
[17:11:55] htmldrum: has joined #RubyOnRails
[17:12:07] jliberman: hello, rubyists!
[17:13:42] mike___1234: has joined #RubyOnRails
[17:13:48] jliberman: in testing, does anyone know how to set a stub in `setup` and unset it in `teardown`? I don't want to have to add `@controller.stub :authorize, true do ...` to all of my controller tests
[17:14:34] tvw: has joined #RubyOnRails
[17:14:47] smathy: bricker, we discovered, painfully, that Chronic doesn't set its internal TZ to Rails's when used in Rails.
[17:14:50] rustymye_: has joined #RubyOnRails
[17:14:56] jkamenik: has joined #RubyOnRails
[17:15:17] bricker: smathy: well it's not a Rails plugin so that makes sense
[17:16:14] smathy: bricker, not saying that I can't make sense of it, but it was not very DWIMmy.
[17:17:42] smathy: Most situations are better handled with strptime anyway.
[17:18:22] smathy: jliberman, you're just using the default xunit testing framework?
[17:18:36] jliberman: smathy: minitest and minitest/mock
[17:18:51] nzst: has joined #RubyOnRails
[17:20:17] arup_r: any idea why not able to load files from `lib/knet` recursively ? https://gist.github.com/aruprakshit/5ead6b70369668722dc5#file-application-rb-L16
[17:20:28] arup_r: I got stuck here now 30 mins
[17:21:47] smathy: jliberman, simplest is to use minitest-around: https://github.com/splattael/minitest-around
[17:22:12] doodlehaus: has joined #RubyOnRails
[17:22:58] umgrosscol: has joined #RubyOnRails
[17:23:38] erts: has joined #RubyOnRails
[17:23:47] erts: has left #RubyOnRails: ()
[17:23:55] erts: has joined #RubyOnRails
[17:25:14] arup_r: let me know if anything unclear in my question or gist
[17:25:37] theery: has joined #RubyOnRails
[17:25:40] smathy: arup_r, remove the **
[17:25:47] smathy: ...or the **/ really
[17:25:55] Exuma: has joined #RubyOnRails
[17:25:55] djbkd: has joined #RubyOnRails
[17:26:57] arup_r: smathy, you mean like this `http://stackoverflow.com/a/19650564/2767755` ?
[17:27:07] arup_r: I tried, but didn't work also
[17:28:24] jliberman: smathy: I tried that gem, but it kept giving me a DoubleRenderError (and I confirmed I wasn't actually calling render twice)
[17:28:53] smathy: arup_r, yes, change it to that, and then re-run your code and show the error you're getting there.
[17:28:54] smathy: arup_r, the way you have it is definitely wrong.
[17:28:56] jliberman: actually, nevermind that. I just had an epiphany
[17:29:01] smathy: ...so let's start with the right way.
[17:29:49] arup_r: what I had now I saw here -- http://www.williambharding.com/blog/technology/rails-3-autoload-modules-and-classes-in-production/
[17:32:02] r0nin: has joined #RubyOnRails
[17:33:06] arup_r: smathy, I tried as you said... here is the new error https://gist.github.com/aruprakshit/5ead6b70369668722dc5
[17:34:05] r0nin: has joined #RubyOnRails
[17:34:37] netzfisch: has joined #RubyOnRails
[17:34:49] Detch: has joined #RubyOnRails
[17:35:22] bungoman: has joined #RubyOnRails
[17:36:45] cnk: has joined #RubyOnRails
[17:37:13] dede: has joined #RubyOnRails
[17:37:25] Iacobus: has joined #RubyOnRails
[17:38:34] garrypolley: has joined #RubyOnRails
[17:39:10] jlyndon: has joined #RubyOnRails
[17:39:25] danlucraft: has joined #RubyOnRails
[17:39:44] baweaver: has joined #RubyOnRails
[17:40:23] yardenbar: has joined #RubyOnRails
[17:40:39] bronson: has joined #RubyOnRails
[17:43:04] goodcodeguy: has joined #RubyOnRails
[17:45:49] Dreamer3: has joined #RubyOnRails
[17:47:38] Lytol: has joined #RubyOnRails
[17:47:41] arup_r: smathy, if I use bin/rails runner all is fine.. I am not getting any error.. But from controller call it is throwing error..
[17:48:20] GhettoCode: has joined #RubyOnRails
[17:48:30] jliberman: solved it. in case anyone is curious, I am using pundit to authorize, and needed to be calling @controller.stub :authorize, proc { @controller.skip_authorization } do ...`. The "DoubleRenderError" was a bug in my error handler, so bonus bug fix ;)
[17:49:53] p1k: has joined #RubyOnRails
[17:49:59] paulcsmith: has joined #RubyOnRails
[17:50:25] tuelz: has joined #RubyOnRails
[17:50:29] mikeric: has joined #RubyOnRails
[17:50:38] broman: why can't a get a delete method with this code: <%= link_to "Remover", reitoria_aproveitamento_path(aproveitamento.id), :method => :delete, :confirm => "Deseja deletar o aproveitamento?" %> ???
[17:50:57] tuelz: how can I get access to controller defined helper_methods inside my rspec tests?
[17:51:22] siddart_: has joined #RubyOnRails
[17:51:39] darrencauthon: has joined #RubyOnRails
[17:51:55] stczhv: has joined #RubyOnRails
[17:53:42] garrypolley: has joined #RubyOnRails
[17:54:19] qejk: has joined #RubyOnRails
[17:54:41] n1lo: has joined #RubyOnRails
[17:54:58] r0nin_: has joined #RubyOnRails
[17:56:19] doodlehaus: has joined #RubyOnRails
[17:57:33] smathy: arup_r, just to be sure, you *have* restarted your server right?
[17:57:46] arup_r: Yes I did..
[17:57:54] cnk: broman: that should be fine. You are loading the default rails javascript libraries right?
[17:58:11] eggoez: has joined #RubyOnRails
[17:58:12] cnk: so the confirm works, etc
[17:59:25] lytol_: has joined #RubyOnRails
[17:59:44] smathy: arup_r, OH! I know what you've done.
[17:59:53] smathy: arup_r, you have a Payment model don't you?
[18:00:01] arup_r: Yes I do have
[18:00:10] rubyonrailed: has joined #RubyOnRails
[18:00:51] arup_r: but I am calling `Payment` class using namespace name
[18:00:53] smathy: arup_r, right, so the problem with autloading is that if a constant is already defined then ruby won't even look for a file to autoload.
[18:01:08] momomomomo: has joined #RubyOnRails
[18:01:16] arup_r: so.. I need to change the class name ?
[18:01:22] smathy: arup_r, so in your E24 class, when ruby sees Payment::Body it already has Payment defined, so it goes there and looks for Body, and there's no Body within your Payment model.
[18:01:25] lytol_: has joined #RubyOnRails
[18:01:42] smathy: arup_r, either that, or use the fully qualified Knet::Payment::Body in your E24 class.
[18:01:56] arup_r: so it doesn't check namespacing ?
[18:02:01] neanderslob: has joined #RubyOnRails
[18:02:30] duderonomy: has joined #RubyOnRails
[18:02:58] smathy: arup_r, alternatively, you can use explicit `require`s in you E24 class.
[18:03:25] smathy: arup_r, ie. put this at the top of your E24 file: require 'knet/payment/body'
[18:04:00] arup_r: require_relative or require ?
[18:04:04] dopie: this is so weird
[18:04:14] triptec_: has joined #RubyOnRails
[18:04:36] smathy: Well you have `lib` in your load path, so you can do either.
[18:05:09] smathy: jliberman, nice one.
[18:05:49] benlieb: has joined #RubyOnRails
[18:06:12] garrypolley: has joined #RubyOnRails
[18:06:24] cochise: has joined #RubyOnRails
[18:07:27] p1k: is anyone around who is very familiar with ActiveRecord?
[18:07:30] momomomomo: has joined #RubyOnRails
[18:08:50] Exuma: has joined #RubyOnRails
[18:09:32] neanderslob: Hi all, I'm attempting to configure two models so that if a boolean value in the parent is "false", it automatically destroys any cocoon-generated fields in the child model.
[18:10:14] paulcsmith: has joined #RubyOnRails
[18:10:20] benlieb: has joined #RubyOnRails
[18:10:24] JoshL: has joined #RubyOnRails
[18:10:39] neanderslob: I'm pretty sure I've seen something like this in the model before but I'm blanking on how to do it, or what it's called
[18:10:43] charliesome: has joined #RubyOnRails
[18:10:57] arup_r: smathy, require trick or FQN both worked
[18:12:39] Spami: has joined #RubyOnRails
[18:14:27] arup_r: no require didn't work I was wrong
[18:15:42] weaksauce: has joined #RubyOnRails
[18:16:53] smathy: arup_r, you did something wrong then.
[18:17:13] benlieb: has joined #RubyOnRails
[18:17:21] rubyonrailed: has joined #RubyOnRails
[18:18:02] microdex: has left #RubyOnRails: ("Leaving...")
[18:18:05] yfeldblum: has joined #RubyOnRails
[18:18:11] Spami: has joined #RubyOnRails
[18:18:22] arup_r: no I did exactly what I said...
[18:18:57] arup_r: i rename classes
[18:19:04] smathy: p1k, !ask2ask
[18:19:04] helpa: p1k: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[18:19:09] arup_r: and it worked
[18:19:29] rokj: has joined #RubyOnRails
[18:19:43] smathy: arup_r, of course, but the require or require_relative also work.
[18:19:52] Schalla: has joined #RubyOnRails
[18:19:52] arup_r: no idea..
[18:19:53] edwinvdgraaf: has joined #RubyOnRails
[18:20:14] poli: has joined #RubyOnRails
[18:20:25] smathy: arup_r, I don't mind which solution you go with, but if you want to leave the names the same then the require option will work. If it didn't, update your gist with the new code and errors and I'll tell you what's wrong.
[18:21:02] p1k: I'm wondering about the changed? and .changes properties from my understanding of the code they seem to update only after the :after_save etc. callbacks have been run
[18:21:03] garrypolley: has joined #RubyOnRails
[18:22:13] bricker: p1k: they are hooked into the attribute setters
[18:22:47] smathy: p1k, maybe you're thinking of `previous_changes` ?
[18:22:49] p1k: bricker: yeah but changes_applied runs after most of the call backs
[18:23:17] smathy: p1k, right, and look at the docs for that: http://devdocs.io/rails/activemodel/dirty#method-i-changes_applied
[18:23:25] smathy: p1k, it updates `previous_changes`
[18:23:39] smathy: p1k, and *clears* `changes`
[18:24:01] p1k: smathy: Yeah I got that part
[18:24:05] Freebird: has joined #RubyOnRails
[18:24:30] smathy: Maybe we're misunderstanding your question here.
[18:24:31] p1k: my issue is that if an object's method is triggered by an after_save type call back and there are several path-ways for this the object cannot tell if it an update for it already exists in the current_transaction or not
[18:24:44] p1k: since .changes? won't tell anything useful until it commits
[18:25:06] smathy: p1k, as bricker said, .changes? is set by the attribute setter, nothing to do with saving.
[18:25:21] dopie: https://gist.github.com/staycreativedesign/b9271fc55e61085c9043
[18:25:38] OS-14813: smathy: https://gist.github.com/anonymous/256759f1835ea21b60ba unauthenticated test case not passing. The session of the test case before seems to be reused, the controller its telling me the current user is the "admin"
[18:25:41] dopie: This means I'm trying to call event.partnership.name and name is not available?
[18:26:03] smathy: p1k, see: https://gist.github.com/smathy/7ee0dc2e270491f141fd
[18:26:11] p1k: smathy: i'm looking at this: https://github.com/rails/rails/blob/master/activerecord%2Flib%2Factive_record%2Fattribute_methods%2Fdirty.rb
[18:26:14] arup_r: smathy, https://gist.github.com/aruprakshit/5ead6b70369668722dc5
[18:26:35] p1k: which is what calls the attributor setter ?
[18:26:52] artto: has joined #RubyOnRails
[18:26:59] smathy: p1k, write_attribute
[18:27:39] p1k: I'm talking about ActiveRecord's interaction here
[18:28:16] cochise: has joined #RubyOnRails
[18:28:32] r0nin: has joined #RubyOnRails
[18:29:52] p1k: the model is still not updated at the time after_save etc. callbacks are called - so while the transactional records technically exist on the current_transaction, It doesn't seem like there is any way to check
[18:30:14] p1k: if the object is dirty, but an update already exists in the current transaction, or whether it does not
[18:30:30] p1k: well without opening ActiveRecord classes
[18:30:36] baweaver: has joined #RubyOnRails
[18:30:38] p1k: re-opening*
[18:31:08] arup_r: smathy, i did exactly what you said.. but Rails somehow is taking Payment model .....
[18:31:22] smathy: arup_r, did you restart?
[18:31:30] arup_r: yes mate!
[18:31:55] smathy: That error makes no sense if that's really your code, I have created precisely the same classes in a local project here on my machine and it works as expected.
[18:32:17] smathy: Seems odd that the error is now about autoloading Knet::Payment::Body instead of Payment::Body.
[18:32:31] arup_r: let me try once again,,,......
[18:32:33] smathy: ...that's like you've gone back to autloading the **/ path.
[18:33:17] baweaver: has joined #RubyOnRails
[18:33:27] arup_r: smathy, no i have ` config.autoload_paths += %W(#{config.root}/app/validators #{config.root}/lib)`
[18:36:42] garrypolley: has joined #RubyOnRails
[18:37:10] Freebird: has left #RubyOnRails: ()
[18:39:09] arup_r: smathy, you had set up exactly like me..... ? and your one is working ?
[18:39:39] waseem_: Isn't anything under app already in autoload paths?
[18:39:47] hololeap: has joined #RubyOnRails
[18:40:13] arup_r: waseem_, no validators didn't work without that
[18:41:03] arup_r: i mean wht you said didn't work for me..So i needed to added
[18:42:35] drale2k: has joined #RubyOnRails
[18:43:51] SaintMoriarty: has joined #RubyOnRails
[18:43:54] shevy: has joined #RubyOnRails
[18:43:55] SaintMoriarty: Aha I find you!
[18:43:55] siemprefresco: has joined #RubyOnRails
[18:43:56] SaintMoriarty: Hi I am having an issue trying to access my assets and getting a 404
[18:44:08] shevy: has left #RubyOnRails: ("I'll be back ... maybe")
[18:44:23] arup_r: use asset_path helper
[18:44:25] SaintMoriarty: Hi I am having an issue trying to access my assets and getting a 404
[18:44:36] waseem_: arup_r: Can you require 'knet/payment/body' in console and see if it loads?
[18:45:06] smathy: arup_r, yes, same setup.
[18:45:16] jhass: SaintMoriarty: in production or in development?
[18:45:39] arup_r: [1] pry(main)> require 'knet/payment/body'=> true
[18:45:52] momomomomo: has joined #RubyOnRails
[18:45:53] SaintMoriarty: config.serve_static_files = true <--- Shouldn't this be
[18:46:03] SaintMoriarty: jhass, https://github.com/vartana/brimir/blob/master/config/environments/production.rb
[18:46:08] jhass: SaintMoriarty: did you run bin/rake assets:precompile ?
[18:46:25] waseem_: arup_r: Can you require e24 payment file in a new console session and see if initialize works.
[18:46:36] jhass: and no it shouldn't be, it would be better to let whatever is in front of your appserver to serve them
[18:46:38] arup_r: gvng gist
[18:46:38] SaintMoriarty: this is what I run rake db:create && rake db:schema:load && rake assets:precompile && rails server -b 0.0.0.0
[18:46:57] jhass: SaintMoriarty: so what path for example is giving a 404?
[18:47:02] _solomon: has joined #RubyOnRails
[18:47:07] krz: has joined #RubyOnRails
[18:47:13] arup_r: waseem_, https://gist.github.com/aruprakshit/5ead6b70369668722dc5#comment-1495370
[18:47:18] brianpWins: has joined #RubyOnRails
[18:47:18] SaintMoriarty: jhass, /assets/application-2123f88b1a19e02e94cc609b6bcda153.css
[18:47:19] arup_r: same error
[18:47:27] SaintMoriarty: I check the location and the file is there
[18:47:34] jhass: SaintMoriarty: and if you look at public/assets/ the file is there?
[18:47:43] stczhc: has joined #RubyOnRails
[18:47:55] waseem_: arup_r: Read what I wrote and try again. You did not do what I asked you to do.
[18:47:56] romdi: has joined #RubyOnRails
[18:48:03] jhass: SaintMoriarty: how do you access the app? through a reverse proxy?
[18:48:18] SaintMoriarty: yes, I use nginx on another host
[18:48:46] arup_r: https://gist.github.com/aruprakshit/5ead6b70369668722dc5#comment-1495373
[18:48:46] smathy: arup_r, did you `spring stop` ?
[18:48:52] krzkrz: has joined #RubyOnRails
[18:48:52] stczhc: has left #RubyOnRails: ()
[18:48:54] jhass: SaintMoriarty: and the config of that doesn't specialcase for example the /assets/ location to not proxy?
[18:49:31] jhass: SaintMoriarty: is the asset served if you hit the appserver directly?
[18:49:33] jhack: has joined #RubyOnRails
[18:49:33] jhack: has joined #RubyOnRails
[18:49:36] smathy: arup_r, after you quit your server, run `spring stop` before restarting it.
[18:49:47] SaintMoriarty: jhass, at the current time I am accessing directly to the host
[18:50:02] smathy: arup_r, btw, here's my demo project showing the code working as I described: https://github.com/smathy/r423
[18:50:09] arup_r: and in console ?
[18:50:34] SaintMoriarty: jhass, I am not using the reverse proxy at the moment to avoid any issues that might be from the config. I am accessing it directly on the app server.
[18:51:08] jhass: SaintMoriarty: then I don't believe config.serve_static_files is actually set to true in the environment you actually run
[18:51:48] arup_r: you used require_relative 'payment/body' and I used require 'knet/payment/body'
[18:52:01] arup_r: smathy, is it causing the issue ?
[18:52:24] smathy: No, same either way. Change it to the explicit and re-test if you like.
[18:53:00] FCser: has joined #RubyOnRails
[18:53:03] smathy: arup_r, did you spring stop and you still saw the problem?
[18:53:17] jhass: SaintMoriarty: alternatively setup a second proxy with access to the assets and let that serve them or sync the assets to the machine with the proxy and let that one serve them
[18:53:27] arup_r: no trying
[18:53:48] erich: has joined #RubyOnRails
[18:53:57] SaintMoriarty: jhass, I just checked the Env Variables and I have RAILS_ENV=production
[18:54:41] arup_r: now I did .. same error
[18:54:52] waseem_: arup_r: What about other constants under payment directory can you load them?
[18:55:02] tuelz: has joined #RubyOnRails
[18:55:16] erich: has joined #RubyOnRails
[18:55:43] waseem_: arup_r: How did you create the payment directory?
[18:56:18] waseem_: arup_r: How? :)
[18:56:20] Sheperson: has joined #RubyOnRails
[18:56:34] waseem_: arup_r: What steps did you take to create it?
[18:56:36] Sheperson: Hi everyone
[18:56:44] arup_r: using gvim + NerdTree
[18:56:52] krzkrz: has joined #RubyOnRails
[18:57:02] waseem_: arup_r: Does it let you create new directories?
[18:57:11] Anakat: has joined #RubyOnRails
[18:57:19] waseem_: arup_r: What OS are you using?
[18:57:38] baweaver: has joined #RubyOnRails
[18:57:45] arup_r: and production is ubuntu
[18:57:58] waseem_: arup_r: Can you, in the terminal, give `mkid lib/knet/payment`?
[18:58:00] arup_r: both are giving the same error
[18:58:01] Elion: has joined #RubyOnRails
[18:58:07] waseem_: `mkdir lib/knet/payment`
[18:58:09] ValicekB: has joined #RubyOnRails
[18:58:26] Elion: Hello, how can i rescue an exception into a rescue_from block ?
[18:58:47] arup_r: $ mkdir lib/knet/payment
[18:58:48] arup_r: mkdir: cannot create directory ???lib/knet/payment???: File exists
[18:59:02] Anakat_: has joined #RubyOnRails
[18:59:35] waseem_: This is really odd, I thought there was a trailing whitespace in the directory name.
[19:00:37] bruno-: has joined #RubyOnRails
[19:00:42] arup_r: i gotta made now
[19:00:48] Anakat__: has joined #RubyOnRails
[19:01:03] smathy: waseem_, you're on the wrong track - he has a model called Payment.
[19:01:38] bungoman: has joined #RubyOnRails
[19:01:53] smathy: waseem_, ruby isn't doing the autoload because it already has that loaded, so it's using that to find Payment::Body instead of triggering the autoload.
[19:01:57] artto: has joined #RubyOnRails
[19:02:05] arup_r: smathy, but this error is confusing -- Unable to autoload constant Knet::Payment::Body, expected /home/arup/Rails/gobgob-ror/lib/knet/payment/body.rb to define it
[19:02:07] waseem_: smathy: That should not hurt though, the Payment module is actually Knet::Payment and model is just Payment.
[19:02:13] bricker: has joined #RubyOnRails
[19:02:19] smathy: arup_r, yes, the error is misleading.
[19:02:36] Anakat: has joined #RubyOnRails
[19:02:39] krzkrz: has joined #RubyOnRails
[19:02:41] waseem_: arup_r: Can you change the instance of Payment::Body to Knet::Payment::Body and then try?
[19:02:44] smathy: waseem_, yeah, but the code triggering the error is: Payment::Body.new ...
[19:03:10] smathy: arup_r, if you change that line to the full explicit `Knet::Payment::Body.new` it works right?
[19:03:21] waseem_: It has to work. :)
[19:03:35] smathy: Well, it wouldn't work if there was a whitespace char in the path, etc.
[19:03:40] smathy: ...but yeah, it does work.
[19:03:46] arup_r: forgot.. let me try.. I did lots of thing.. :/
[19:03:51] ararog: has joined #RubyOnRails
[19:04:04] srinidhi: has joined #RubyOnRails
[19:04:11] garrypolley: has joined #RubyOnRails
[19:04:17] smathy: waseem_, although the other code should work too with the require or require_relative. As my own demo project shows.
[19:04:22] waseem_: smathy: Frankly I don't like autoloading constants myself in my projects. I always prefer explicit requires.
[19:04:32] waseem_: smathy: Yes, it should.
[19:04:44] smathy: waseem_, likewise.
[19:05:22] Anakat_: has joined #RubyOnRails
[19:05:27] waseem_: And full constant names. It gives me idea where my code actually is. And, moreover, I know which contants the current file uses and it also makes sure I don't load anything unnecessary in a file.
[19:05:31] arup_r: same error... f****** the shit
[19:05:36] waseem_: Keeps my life simple.
[19:05:44] waseem_: arup_r: Don't use autoload :)
[19:05:58] smathy: waseem_, I like dropping the top level namespace when I'm within one.
[19:06:04] ndrei: has joined #RubyOnRails
[19:06:11] ndrei_: has joined #RubyOnRails
[19:06:16] smathy: arup_r, can you push your code up to a GH repo?
[19:06:40] waseem_: smathy: Yes, I'm indifferent in dropping the top level namespace.
[19:06:54] arup_r: it is in prvt repo.. :/
[19:07:14] arup_r: I am going to change the class name it will work..
[19:07:19] Anakat__: has joined #RubyOnRails
[19:07:20] arup_r: i m tired
[19:07:35] arup_r: thanks guys
[19:07:46] arup_r: god knows what went wrong
[19:08:16] SteenJobs: has joined #RubyOnRails
[19:08:52] Anakat: has joined #RubyOnRails
[19:08:53] smathy: arup_r, ok.
[19:09:04] Scient: https://gist.github.com/tanelsuurhans/00c9667199eabc55554e - what am I missing here
[19:09:06] waseem_: arup_r: http://urbanautomaton.com/blog/2013/08/27/rails-autoloading-hell/
[19:09:06] Scient: should this not work?
[19:09:34] arup_r: The blog name itself is panicking :)
[19:09:38] SaintMoriarty: jhass, think I found the issue
[19:09:57] SaintMoriarty: jhass, I am running test now. It seems like git was possibly getting cached.
[19:10:05] smathy: Scient, add your routes.
[19:10:15] Scient: based on rspec docs, I should not have to do that
[19:10:33] jhass: SaintMoriarty: hence I used "actually" ;)
[19:10:34] Scient: also if I switch the method to be :index, the test works, but its NOT hitting my anonymous controller index action
[19:10:44] Anakat_: has joined #RubyOnRails
[19:11:12] momomomomo: has joined #RubyOnRails
[19:11:41] krzkrz: has joined #RubyOnRails
[19:11:57] benjwadams: has joined #RubyOnRails
[19:12:19] smathy: Scient, anonymous controllers only create resource routes.
[19:12:27] Anakat__: has joined #RubyOnRails
[19:12:31] benlieb: has joined #RubyOnRails
[19:12:32] waseem_: arup_r: Avoid using autoloading. :)
[19:12:35] smathy: Scient, https://www.relishapp.com/rspec/rspec-rails/v/3-3/docs/controller-specs/anonymous-controller#draw-custom-routes-for-anonymous-controllers
[19:12:39] benjwadams: I want to run a stored procedure with a couple params passed in through ruby. How can I execute raw parameterized SQL in Rails/ActiveRecord?
[19:12:43] jonee: has joined #RubyOnRails
[19:13:34] baweaver: has joined #RubyOnRails
[19:14:09] arup_r: smathy, sorry that require worked.. I forgot to change the file name ... :)
[19:14:15] Anakat: has joined #RubyOnRails
[19:14:29] arup_r: class and file name was wrong
[19:14:38] arup_r: should I restart spring ?
[19:14:45] alphaatom: has joined #RubyOnRails
[19:14:47] smathy: arup_r, when doing this sort of thing, always :)
[19:14:58] waseem_: arup_r: There's no harm in that.
[19:15:30] arup_r: I am now get back my life
[19:15:36] arup_r: thanks again guys!
[19:16:01] Anakat_: has joined #RubyOnRails
[19:17:51] Anakat__: has joined #RubyOnRails
[19:17:53] smathy: arup_r, you're welcome.
[19:19:01] Guam: has joined #RubyOnRails
[19:19:49] Anakat: has joined #RubyOnRails
[19:20:06] alexhartley: has joined #RubyOnRails
[19:20:44] meoblast001: has joined #RubyOnRails
[19:21:07] jhack: has joined #RubyOnRails
[19:21:38] Anakat_: has joined #RubyOnRails
[19:22:13] zorak8: has joined #RubyOnRails
[19:23:30] Grundell: has joined #RubyOnRails
[19:24:57] Anakat: has joined #RubyOnRails
[19:25:28] podman: has joined #RubyOnRails
[19:26:19] elmhouse: has joined #RubyOnRails
[19:26:43] Anakat_: has joined #RubyOnRails
[19:27:29] SaintMoriarty: jhass, Walla that was it!
[19:28:34] Anakat__: has joined #RubyOnRails
[19:28:39] aznloren: has joined #RubyOnRails
[19:29:18] edgarjs: has joined #RubyOnRails
[19:29:30] alphaatom: has joined #RubyOnRails
[19:30:05] bruno-: has joined #RubyOnRails
[19:31:03] VeryBewitching: has joined #RubyOnRails
[19:32:04] Anakat_: has joined #RubyOnRails
[19:32:11] shinnya: has joined #RubyOnRails
[19:32:39] alphaatom: has joined #RubyOnRails
[19:35:36] krzkrz: has joined #RubyOnRails
[19:35:40] Anakat: has joined #RubyOnRails
[19:36:40] arup_r: smathy, one more help needed.. I am today too much confused
[19:37:06] bricker: has joined #RubyOnRails
[19:37:28] Anakat_: has joined #RubyOnRails
[19:37:55] arup_r: why this error..? https://gist.github.com/aruprakshit/f3887ad573c5c9f7620f It is pretty simple and should work
[19:38:27] n008f4g_: has joined #RubyOnRails
[19:39:03] elmhouse_: has joined #RubyOnRails
[19:39:11] Anakat__: has joined #RubyOnRails
[19:40:15] Scripore: has joined #RubyOnRails
[19:40:35] broman_: has joined #RubyOnRails
[19:40:37] schaerli: has joined #RubyOnRails
[19:41:00] Anakat: has joined #RubyOnRails
[19:41:32] yardenbar: has joined #RubyOnRails
[19:42:49] Anakat_: has joined #RubyOnRails
[19:44:19] seank_: has joined #RubyOnRails
[19:44:38] Anakat__: has joined #RubyOnRails
[19:45:25] jhack32: has joined #RubyOnRails
[19:46:32] Anakat: has joined #RubyOnRails
[19:47:08] siempref_: has joined #RubyOnRails
[19:47:41] Silox|: has joined #RubyOnRails
[19:47:54] paulcsmith: has joined #RubyOnRails
[19:48:17] eGGsha: has joined #RubyOnRails
[19:48:30] drewdavis: has joined #RubyOnRails
[19:48:58] ur5us: has joined #RubyOnRails
[19:50:05] Anakat_: has joined #RubyOnRails
[19:51:00] theery: has joined #RubyOnRails
[19:52:35] alexhartley: has joined #RubyOnRails
[19:52:42] broman_: has left #RubyOnRails: ()
[19:52:55] broman: has joined #RubyOnRails
[19:53:13] broman: why this isn't working?? instead of delete method, it sends a get ! <%= link_to "Remover", reitoria_aproveitamento_path(aproveitamento.id), :method => :delete %>
[19:53:53] Anakat: has joined #RubyOnRails
[19:53:57] marr: has joined #RubyOnRails
[19:54:37] bonhoeffer: has joined #RubyOnRails
[19:54:52] SteenJobs: has joined #RubyOnRails
[19:55:08] eggoez: has joined #RubyOnRails
[19:55:36] Anakat_: has joined #RubyOnRails
[19:57:15] Anakat__: has joined #RubyOnRails
[19:58:20] ddv: broman, please use english for your url, use method: :delete, and maybe dump erb for haml or something better, you don't have to to call id on aproveitamento, have you checked: http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-link_to ?
[19:58:43] bonhoeffer: has joined #RubyOnRails
[19:59:35] broman: ddv, thanks for the reply.. i resolved constructing another route :)
[19:59:43] Anakat: has joined #RubyOnRails
[19:59:53] ddv: broman, program in english :)
[20:00:54] broman: ddv, i cant :( this is not my application... if i do that, i'll drive a lot of people crazy
[20:01:21] ddv: broman, well at least bring it up, because this is very unprofessional
[20:01:23] broman: all my things are coded in english and I am aware of the importance
[20:01:39] broman: I try to say this every day :)
[20:03:22] Anakat_: has joined #RubyOnRails
[20:05:03] kidoz_: has joined #RubyOnRails
[20:05:13] Anakat: has joined #RubyOnRails
[20:06:40] bungoman: has joined #RubyOnRails
[20:06:54] Anakat__: has joined #RubyOnRails
[20:06:59] dman777_alter: rails generate controller foo is not generating a module for the controller. I keep gettings 'uninitialized constant DarinApi' for namespace: darinApi
[20:07:37] bungoman: has joined #RubyOnRails
[20:07:38] bin_005: has joined #RubyOnRails
[20:08:26] Lytol: has joined #RubyOnRails
[20:08:43] Anakat_: has joined #RubyOnRails
[20:09:34] mike___1234: has joined #RubyOnRails
[20:10:18] arup_r: I am trying to catch my custom exceptions inside my controller, but not able to catch those.. https://gist.github.com/aruprakshit/45681f6e942dcad5a82d
[20:10:23] SteenJobs: has joined #RubyOnRails
[20:10:23] arup_r: any idea why ?
[20:10:29] Anakat: has joined #RubyOnRails
[20:11:31] a3gis: has joined #RubyOnRails
[20:12:00] benlieb: has joined #RubyOnRails
[20:12:21] Anakat__: has joined #RubyOnRails
[20:13:13] Lytol: has joined #RubyOnRails
[20:13:30] xkickflip: has joined #RubyOnRails
[20:14:16] Anakat_: has joined #RubyOnRails
[20:15:50] Anakat: has joined #RubyOnRails
[20:15:53] dopie: has joined #RubyOnRails
[20:16:09] soule: has joined #RubyOnRails
[20:17:11] artto: has joined #RubyOnRails
[20:17:38] Anakat__: has joined #RubyOnRails
[20:18:20] baweaver: has joined #RubyOnRails
[20:18:51] seank_: has joined #RubyOnRails
[20:19:21] Maletor: has joined #RubyOnRails
[20:19:23] Anakat_: has joined #RubyOnRails
[20:19:32] chouhoulis: has joined #RubyOnRails
[20:20:20] Anakat___: has joined #RubyOnRails
[20:20:43] pixelhandler: has joined #RubyOnRails
[20:24:48] a3gis: has joined #RubyOnRails
[20:26:30] noodman: has joined #RubyOnRails
[20:26:53] FCser: has joined #RubyOnRails
[20:27:02] edgarjs: has joined #RubyOnRails
[20:27:19] giowong: has joined #RubyOnRails
[20:30:36] Pardejini: has joined #RubyOnRails
[20:30:40] lxsameer: has joined #RubyOnRails
[20:32:56] Pardejini: Have a problem with steam/rails. Can anyone help?
[20:33:28] mbenitez: has joined #RubyOnRails
[20:33:52] mikeric: has joined #RubyOnRails
[20:35:01] alexey__: has joined #RubyOnRails
[20:35:40] jenrzzz: has joined #RubyOnRails
[20:35:49] ur5us: has joined #RubyOnRails
[20:36:55] Axy: has joined #RubyOnRails
[20:36:55] Axy: has joined #RubyOnRails
[20:37:07] mikeric: anyone familiar with actionmailer or the mail gem; is there a way to have actionmailer *not* break a header value (From, Subject, etc.) into multiple lines (it seems to break it into 72 characters) after encoded a UTF-8 header?
[20:37:21] roolo: has joined #RubyOnRails
[20:37:59] mikeric: unfortunately it breaks the value in the middle of multibye characters (where one half is at the end of the first line and the other half is at the beggining of the new line) which is invalid and Mandrill cannot parse this.
[20:38:01] SteenJobs: has joined #RubyOnRails
[20:39:02] mikeric: oddly there is a note in the guides that indicates it should be handled properly.. http://guides.rubyonrails.org/v3.2.21/action_mailer_basics.html#auto-encoding-header-values
[20:39:52] momomomomo_: has joined #RubyOnRails
[20:39:59] mbenitez: has left #RubyOnRails: ()
[20:40:00] mbenitez: has joined #RubyOnRails
[20:40:18] lindii_: has joined #RubyOnRails
[20:40:23] mbenitez: has left #RubyOnRails: ()
[20:42:04] jgpawletko: has joined #RubyOnRails
[20:42:13] crunk_bear: has joined #RubyOnRails
[20:42:14] baweaver: has joined #RubyOnRails
[20:43:04] x-light: has joined #RubyOnRails
[20:44:17] JeramyRR: has joined #RubyOnRails
[20:46:49] simplyianm: has joined #RubyOnRails
[20:47:05] smathy: "program in english" - WTF?
[20:48:09] skyjumper: ACTION had a job once where we had to do exactly that
[20:50:04] sypheren: has joined #RubyOnRails
[20:50:10] towski_: has joined #RubyOnRails
[20:51:39] mikecmpbll: since when's that a thing
[20:51:41] smathy: ...not that the rest of the advice was any better.
[20:52:21] mikecmpbll: ethnic cleansing
[20:52:58] smathy: "Use english, use an equally valid alternate hash syntax, use the view templating engine that I prefer, and RTFM"
[20:53:22] Papierkorb: "non-english code in a non-english environment?! Oh my god you script kiddie" wut?
[20:54:22] DoubleMalt: has joined #RubyOnRails
[20:54:46] edwinvdgraaf: has joined #RubyOnRails
[20:54:52] smathy: mikeric, could you be using an older version?
[20:54:55] Papierkorb: Also: I hate chrome. It completely breaks my CSS. Works great in FF though. I mean it not only puts DOM nodes on the screen where they're not supposed to, but moving the DOM node (in F12 tools) away and to the same place back fixes it. Oh, and the text input now flickers too.
[20:55:41] smathy: Papierkorb, we all hate every browser other than the one we use all the time to dev.
[20:55:49] benlieb: has joined #RubyOnRails
[20:55:57] Grundell: has joined #RubyOnRails
[20:56:06] mikecmpbll: which is why i hate everything but curl!
[20:56:11] Papierkorb: Yes. Well, I'd understand it if it would break consistently, but moving the DOM around fixes it? Huh?
[20:56:31] Papierkorb: Feels like the layouter messes up or something
[20:56:46] smathy: mikecmpbll, nice to see you've stopped use telnet
[20:57:36] bricker: mikecmpbll: dude, have you read how Richard Stallman browses the internet?
[20:57:44] mikecmpbll: bricker: no?
[20:57:53] mikecmpbll: but i already have good feels about it.
[20:58:17] bricker: mikecmpbll: https://stallman.org/stallman-computing.html this is real and hilarious
[20:59:01] bricker: mikecmpbll: Cmd+F "I am careful in how I use the Internet."
[20:59:33] bricker: he uses a program that basically wget's webpages and then sends him and e-mail with the content
[21:00:48] qejk: has joined #RubyOnRails
[21:01:03] mikecmpbll: ACTION clones hacks.git
[21:01:06] Papierkorb: I would've expected he uses emacs or something
[21:01:10] bronson: has joined #RubyOnRails
[21:01:43] mikecmpbll: ooh it's perl
[21:02:49] Papierkorb: the git history is lovely too
[21:02:51] crwilcox: has joined #RubyOnRails
[21:03:06] bonhoeffer: has joined #RubyOnRails
[21:03:36] Elion: hi, i really need some help with an odd bug, i'm using rails 4.2 with the gem rabl-rails to serve an api, i have an angular frontend. the bug is that when i go to a specific page and refresh the page, i got TypeError - no implicit conversion of nil into String: for every other api call, i don't even know where to search
[21:03:51] rokj: has joined #RubyOnRails
[21:04:00] alex88: has joined #RubyOnRails
[21:04:17] mikecmpbll: Elion: start with the stack trace?
[21:04:19] bricker: Elion: start with the backtrace of the error
[21:04:43] mikecmpbll: how you gunna debug it if you dunno what object is nil and should be a string!
[21:04:43] Papierkorb: "- webxfer: Execute commands on a remote host using HTTP" ... really?
[21:04:51] mikecmpbll: Papierkorb: everyone needs that in their life.
[21:05:05] baweaver: has joined #RubyOnRails
[21:05:54] yfeldblum: has joined #RubyOnRails
[21:06:16] gs: has joined #RubyOnRails
[21:08:05] Elion: i'll do a gist
[21:08:40] momomomomo_: has joined #RubyOnRails
[21:10:24] Elion: mikecmpbll, bricker: https://gist.github.com/anonymous/dfb781e9eeea247f4746
[21:10:24] bin_005: has joined #RubyOnRails
[21:11:16] bricker: Elion: find the first line that is from your app, and work from there
[21:11:25] cac_: has joined #RubyOnRails
[21:11:25] bricker: app/views/users/current.rabl:3
[21:11:37] hazelux: has joined #RubyOnRails
[21:12:22] Elion: bricker: the fun thing is that the app/views/users/current.rabl is actually of only 2 lines
[21:13:03] bricker: you telling me ruby is lying to us
[21:13:11] netzfisch: has joined #RubyOnRails
[21:13:54] ciree: Elion: scroll down
[21:14:00] Elion: bricker: how can i add a file to that gist
[21:14:05] hazelux: Hey guys. How can I pass a decorated AR object into a .where query? I'm getting a "Cannot visit ActivityNotifier" error from Arel
[21:15:07] lucha: has joined #RubyOnRails
[21:15:23] alphaatom: has joined #RubyOnRails
[21:16:14] bricker: Elion: edit it and add a file
[21:16:14] mikecmpbll: Elion: do you have a github account?
[21:16:33] mikecmpbll: if so, login/register to gist with it, and then you can edit your gists.
[21:16:36] alphaatom: has joined #RubyOnRails
[21:16:51] Elion: ok i created the gist before login in, i'll make another
[21:17:09] givanse: has joined #RubyOnRails
[21:17:44] kham1: has joined #RubyOnRails
[21:19:10] zorak8: has joined #RubyOnRails
[21:19:16] blackmesa: has joined #RubyOnRails
[21:20:00] Elion: mikecmpbll, ciree, bricker : https://gist.github.com/Nox-404/f635d97173d2048a971a
[21:21:16] momomomomo: has joined #RubyOnRails
[21:21:31] bricker: Elion: I don't know how Rabl works but check that your @user instance variable isn't nil
[21:21:59] Elion: bricker: i checked with a binding.pry and @user is defined
[21:22:23] relix: has joined #RubyOnRails
[21:22:32] CheckYourSix: has joined #RubyOnRails
[21:22:39] El3ktra_: has joined #RubyOnRails
[21:22:40] bungoman: has joined #RubyOnRails
[21:23:07] matcouto: has joined #RubyOnRails
[21:23:16] mikecmpbll: seems odd to be pointing to a line that doesn't exist
[21:23:27] mikecmpbll: i reckon you're not running that code.
[21:23:56] Casty: has joined #RubyOnRails
[21:23:58] El3ktra_: has left #RubyOnRails: ()
[21:24:03] mikecmpbll: Elion: what is 'users/show' ?
[21:24:10] mikecmpbll: oops at the bottom
[21:24:28] El3ktra: has joined #RubyOnRails
[21:24:51] El3ktra: has left #RubyOnRails: ()
[21:27:32] Elion: mikecmpbll: i added the content of the action that lead to this error and the dump of @user from the binding.pry
[21:28:02] hazelux: Is it a bad practice to decorate an object, call a method on it, and then assign the undecorated object to the instance var and pass that to the view?
[21:28:10] mikecmpbll: Elion: meh, i don't know how rabl works so might be missing something
[21:28:32] mikecmpbll: Elion: just do something crude like remove everything from current.rabl
[21:29:06] mikecmpbll: hazelux: :/ that's quite cryptically broad
[21:29:50] Elion: mikecmpbll: i did, when i comment all, the api start working again, then i uncomment and it works too until i press f5 on a specific page, not every pages just one
[21:29:51] x-light: has joined #RubyOnRails
[21:30:07] Elion: mikecmpbll: that do 2 selects
[21:30:17] blackmes1: has joined #RubyOnRails
[21:30:33] ur5us: has joined #RubyOnRails
[21:32:23] kadoppe: has joined #RubyOnRails
[21:33:42] Senjai: I just realized
[21:33:50] Senjai: R4IA may not be out before rails 5..
[21:34:02] mikecmpbll: Senjai: haha /facepalm
[21:34:34] fighella: has joined #RubyOnRails
[21:35:04] baweaver: has joined #RubyOnRails
[21:36:23] bungoman: has joined #RubyOnRails
[21:38:07] Stuffness: has joined #RubyOnRails
[21:38:52] Spami: has joined #RubyOnRails
[21:38:59] mikecmpbll: Elion: i've absolutely no idea tbh.
[21:39:22] mikecmpbll: Elion: can't really debug without knowing where the error is occurring.
[21:39:39] Elion: mikecmpbll: same for me, i really don t understand
[21:39:59] aznloren: has joined #RubyOnRails
[21:40:01] mikecmpbll: good luck with it.
[21:40:52] Elion: mikecmpbll: thanks, i hope i won t go mad with that :)
[21:41:10] El3ktra: has joined #RubyOnRails
[21:41:14] aznloren: has joined #RubyOnRails
[21:42:18] mikecmpbll: Elion: hope not! :) you need to find out where the error is occuring, shouldn't be too hard just by removing stuff, seeing as the trace isn't helping us, some how.
[21:42:35] aznloren: has joined #RubyOnRails
[21:43:00] mikecmpbll: Elion: also, be sure that you're running the code you think you are. make sure you restart everything (including spring) just in case there's any funny business.
[21:43:17] jenrzzz: has joined #RubyOnRails
[21:48:05] momomomomo: has joined #RubyOnRails
[21:48:22] Anubix1: has joined #RubyOnRails
[21:48:52] lindii_: has joined #RubyOnRails
[21:49:33] Anubix1: In controller there is notice message, but when i wrote into string <strong></strong> it is not strong in view, html tag is not converted to html tag
[21:51:52] smathy: Elion, you're doing: object :@user - all the RABL examples just provide the variable itself, ie.: object @user
[21:52:06] smathy: (I know nothing about RABL, but that screams out at me as a problem)
[21:52:29] Elion: smathy: it's rails-rabl not rabl, it's quite similar
[21:52:31] bruno-: has joined #RubyOnRails
[21:53:20] disperso: has joined #RubyOnRails
[21:53:54] smathy: Elion, if you mean you're using the rabl-rails gem, all that does is pulls the rabl gem in and does whatever template/generator integration is convenient for Rails.
[21:53:57] Elion: mikecmpbll: funny thing, when i add a binding.pry just after the do here : https://gist.github.com/Nox-404/f635d97173d2048a971a#file-show-rabl-L5 and just press ctrl-d when it hit the breakpoint, it work
[21:54:02] idd2d: has joined #RubyOnRails
[21:54:24] smathy: Elion, right, but you're testing the value of @user
[21:54:42] smathy: ...that doesn't mitigate the problem if you're not meant to be passing :@user into the `object` method.
[21:55:15] Elion: smathy: in rabl-rails you need to pass :@object and not @object
[21:55:16] smathy: Elion, but I see in the rabl-rails README that it does tell you to do that.
[21:55:43] Anubix1: has left #RubyOnRails: ()
[21:55:57] mikecmpbll: use jbuilder, program in english, and rtfm
[22:00:52] smathy: Elion, could the problem here be that `timestamps.rabl` sets object to :@object ?
[22:01:26] smathy: Maybe that's some magical rabl instance var, but that seems weird.
[22:01:40] mikecmpbll: it's unable to find a template or something cus https://github.com/ccocchi/rabl-rails/blob/master/lib/rabl-rails/library.rb#L71 is nil
[22:02:11] mikeric: has joined #RubyOnRails
[22:03:04] smathy: I'm not seeing that in the backtrace mikecmpbll
[22:03:07] theery: has joined #RubyOnRails
[22:03:33] mikecmpbll: ugh, how'd i get there.
[22:03:57] giowong: can someone help me translate this sql to active record query?
[22:03:58] giowong: http://pastebin.com/WFk2PRYq
[22:04:20] mikecmpbll: ah yeah, from #compile
[22:04:29] mikecmpbll: https://github.com/ccocchi/rabl-rails/blob/master/lib/rabl-rails/library.rb#L47
[22:04:41] giowong: https://gist.github.com/gwong89/93c3a5ce632ebaef2156
[22:05:03] bonhoeffer: has joined #RubyOnRails
[22:05:43] smathy: mikecmpbll, ah gotcha, so yeah - one of the paths Elion's passing to `extends` is wrong.
[22:05:57] JeramyRR: has joined #RubyOnRails
[22:06:10] smathy: mikecmpbll, maybe also that "timestamps.rabl" one - it's the only one that has its extension.
[22:06:40] mikecmpbll: smathy: good spot
[22:07:04] smathy: Some more things to follow up on Elion ^
[22:07:32] mikecmpbll: giowong: Video.where(theme_id: [9,12]).count('distinct user_id')
[22:07:49] mikecmpbll: giowong: !querying and next time have a go yourself ;)
[22:07:49] helpa: giowong: http://guides.rubyonrails.org/active_record_querying.html - ActiveRecord Querying Guide by Ryan Bigg
[22:10:26] giowong: thanks mike
[22:11:00] quarters: has joined #RubyOnRails
[22:12:10] mikecmpbll: giowong: but if you want the number of users that have videos using that theme ... then do User.joins(video: :theme).where(themes: { id: [9, 12] }).uniq.count
[22:12:26] mikecmpbll: giowong: it's probably less efficient but easier to work with imo.
[22:12:30] giowong: is it possible to pass in object values for the theme_id? basically i have a theme relation for video and
[22:13:42] giowong: let me try to phrase what i want to say
[22:14:42] ledestin: has joined #RubyOnRails
[22:16:10] giowong: so basically i need to somehow to pass the actual theme id into the search instead of placing hardcoded values, because i will be automating this
[22:16:22] nahtnam: has joined #RubyOnRails
[22:16:31] mikecmpbll: so just pass the actual theme id :)
[22:16:34] quarters: I'm following the tutorial on rubytutorial.org but am finding myself stuck when running rake test(specifically the users_login_test). The repo can be found here: https://bitbucket.org/zebralight/sample_app/
[22:16:41] mikecmpbll: tell us what your inputs are
[22:16:56] mikecmpbll: quarters: stuck how?
[22:17:40] quarters: mikecmpbll: one of the tests is failing. It seems as if the users_login_test is not picking up the links that appear on the root_url when a user is logged out
[22:17:51] giowong: https://gist.github.com/gwong89/93c3a5ce632ebaef2156
[22:17:54] giowong: so this query
[22:18:08] mikecmpbll: quarters: why not make it easy for someone to help and link to the failing test? :)
[22:18:51] quarters: mikecmpbll: thanks. I've only linked to the actual repo for someone once before and the link I provided worked at the time. Let me get you the link
[22:19:12] giowong: it will count the amount of unique users for all themes for a client
[22:20:01] x-light: has joined #RubyOnRails
[22:20:12] seank_: has joined #RubyOnRails
[22:20:18] giowong: the other one i gave earlier works but im not sure how to pass the client only existing themes
[22:20:50] mikecmpbll: giowong: that's not really helped
[22:21:26] Elion: mikecmpbll, smathy: ok i think it was because of the cache, i replaced the extends in the current rabl by the content of the show.rabl and it works now
[22:21:28] mikecmpbll: why not explain it in terms of your rails code, what value(s) you're trying to get
[22:21:46] mikecmpbll: Elion: which extends?
[22:21:57] quarters: mikecmpbll: https://bitbucket.org/zebralight/sample_app/src/c7ca56f6dec0e0aa9b1dd1f97c00ededad9c6824/test/integration/users_login_test.rb?at=log-in-log-out
[22:22:02] Elion: the extends 'users/show'
[22:22:21] giowong: im just trying to get the sum of all unique users
[22:22:29] giowong: well not sum total
[22:22:31] quarters: mikecmpbll: it's failing at line 34
[22:22:39] jgpawletko: has joined #RubyOnRails
[22:22:54] giowong: the total amount of unique users for a client that has multiple theme
[22:23:21] Mweshi: has joined #RubyOnRails
[22:23:37] mikecmpbll: a client, so the client is predetermined?
[22:23:38] giowong: the earliest gist was given to my coworker , but he hardcoded the theme_id
[22:23:43] mikecmpbll: (failing to explain what the inputs are again)
[22:24:00] giowong: basically this data will be sent out through email
[22:24:09] giowong: im looping through the client model
[22:24:19] mikecmpbll: "client who has multiple themes" - what is the relationship between client and themes?
[22:24:39] mikecmpbll: you do reaslise we have no idea about your application.
[22:24:42] bungoman_: has joined #RubyOnRails
[22:25:05] giowong: relationship
[22:25:09] giowong: are you asking for schema
[22:25:19] mikecmpbll: rails associations between the models
[22:25:20] quarters: mikecmpbll: when I remove that line, it still fails at line 34 and I continued removing lines until I passed. So it fails on lines 34-36. I tried to change line 33 to "get root_url" but the following lines still failed
[22:25:29] giowong: a client has many themes
[22:25:29] giowong: a theme has many videos
[22:25:30] giowong: a video has one property
[22:25:31] giowong: a user has many properties
[22:27:12] mikecmpbll: User.joins(properties: { video: { theme: :client } }).where(client: { id: @client }).uniq.count ?
[22:27:40] mikecmpbll: User.joins(properties: { video: { theme: :client } }).where(clients: { id: @client }).uniq.count ?
[22:31:17] _utah_: has joined #RubyOnRails
[22:31:28] giowong: i would give you a million upvotes if irrc permitted it
[22:31:31] giowong: thank you very much
[22:31:39] mikecmpbll: quarters: according to line 32, that is redirecting to root_url
[22:34:57] mikecmpbll: quarters: nvm. i dunno. gist your failing test output
[22:35:22] richipargo: has joined #RubyOnRails
[22:36:33] quarters: mikecmpbll: I read ahead and it seems as if I have to program logging out methods for the session and the tests at this point are SUPPOSED to fail
[22:36:56] michael_mbp: has joined #RubyOnRails
[22:38:46] tvw: has joined #RubyOnRails
[22:39:38] renegadeandy: has joined #RubyOnRails
[22:41:01] Guam: has joined #RubyOnRails
[22:41:26] Coldblackice: has joined #RubyOnRails
[22:41:35] tejasmanohar: has joined #RubyOnRails
[22:41:37] tejasmanohar: https://gist.github.com/tejasmanohar/7a3302809bbc04f210ef
[22:41:47] tejasmanohar: User.group_by_day(:created_at) err'ing, not sure why
[22:42:03] tejasmanohar: it works in my code as User.group_by_day(:created_at).count
[22:42:06] tejasmanohar: but not in rails c
[22:42:29] baweaver: has joined #RubyOnRails
[22:44:29] Radar: GOOD MORNING
[22:49:34] crwilcox: has joined #RubyOnRails
[22:54:41] crwilcox: has joined #RubyOnRails
[23:07:41] mikeric: @smathy: Using 3.2.21, so yea it's an older version.
[23:08:14] mikeric: (than the current version, anyway)
[23:08:39] smathy: mikeric, sorry, I noticed afterwards that you linked to that version of the docs.
[23:09:26] darrencauthon: has joined #RubyOnRails
[23:11:36] renegadeandy: Radar: morning! You ever done any presentations on rails? Are they recorded?
[23:12:02] Radar: renegadeandy: first 3 here: https://www.google.com.au/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=Ryan+Bigg+Ruby+on+Ales&tbm=vid
[23:13:28] Palsson: has joined #RubyOnRails
[23:14:48] Scripore: has joined #RubyOnRails
[23:16:22] renegadeandy: Radar: thanks!
[23:16:35] CheckYourSix: has joined #RubyOnRails
[23:21:10] Spami: has joined #RubyOnRails
[23:21:30] timdotrb: has joined #RubyOnRails
[23:21:40] timdotrb: afternoon, all
[23:23:03] bonhoeffer: has joined #RubyOnRails
[23:23:26] seank__: has joined #RubyOnRails
[23:24:11] siemprefresco: has joined #RubyOnRails
[23:24:33] bobbobbins: has joined #RubyOnRails
[23:25:58] bruno-: has joined #RubyOnRails
[23:26:08] k4nd4lf: has joined #RubyOnRails
[23:26:25] _utah_: has joined #RubyOnRails
[23:27:24] timdotrb: i've been tasked with creating some affiliate software to integrate into our websites. ideally it would be an app running on one server that our other apps would report back to. i have two questions going into this: would the gem Ahoy be good for this, and would i need to create an API for the apps to report to?
[23:28:43] charliesome: has joined #RubyOnRails
[23:29:10] volsus: has joined #RubyOnRails
[23:29:41] bobbobbins: hey, I'm having an issue with creating a record: http://pastebin.com/QAVnK1vU
[23:30:43] bobbobbins: well anyway, the error and pertinent code is posted there, if i need to repost it i somewhere else I can
[23:31:26] bricker: timdotrb: It looks like Ahoy integrates into your app, so you'd have to integrate into each one, not ideal
[23:31:36] bricker: timdotrb: an API is a good tool for this job
[23:31:48] bricker: timdotrb: then just build a simple ruby client for the API and drop it into each of your apps
[23:32:28] timdotrb: bricker, that's what i was getting from it. we have some PHP apps that will have to report to the affiliate software
[23:32:43] bricker: timdotrb: well then an API is definitely the right choice
[23:32:50] bricker: API doesn't care what language the client is written in :)
[23:33:06] jonee: has joined #RubyOnRails
[23:34:28] timdotrb: so then i'll basically just build the API and affiliate tracking from scratch. hmm
[23:34:44] timdotrb: then each app will have to make API calls on user actions
[23:36:54] Freebird: has joined #RubyOnRails
[23:36:54] crwilcox_: has joined #RubyOnRails
[23:37:26] Freebird: has left #RubyOnRails: ()
[23:39:30] bricker: If it were me I wouldn't build it myself, there are already so many services for that already
[23:39:43] siempref_: has joined #RubyOnRails
[23:39:54] zorak8: has joined #RubyOnRails
[23:40:10] timdotrb: yea, that's the direction that i'm leaning as well
[23:40:25] timdotrb: may be worth it to just pay for a service
[23:40:58] bricker: you don't want to build funneling and stuff, it's not trivial and the company will end up spending way more on you than if they had just rented a service
[23:41:00] timdotrb: the only issue with that is finding a service that has all the features the big bossman wants
[23:41:23] timdotrb: yea, it doesn't sound like a fun project at all
[23:42:03] arBmind: has joined #RubyOnRails
[23:42:28] charliesome: has joined #RubyOnRails
[23:43:51] chrisarcand: has joined #RubyOnRails
[23:46:59] lampd1: would some kind soul mind taking a look at this? https://gist.github.com/reidblomquist/771a9768a6311f04a8c3
[23:47:01] zorak8: has joined #RubyOnRails
[23:47:45] lampd1: i know i'm going to need a migration, but i don't think these associations look right for wanting my rate to have a shipping_type_id as well as shipping_type_name
[23:47:53] lampd1: feel like I need a has_one, through or something
[23:48:34] lampd1: if you are kind enough to take a look and need more info lmk, will gladly provide :)
[23:49:43] baweaver: has joined #RubyOnRails
[23:51:18] Guam: has joined #RubyOnRails
[23:52:10] fighella: has joined #RubyOnRails
[23:52:55] smathy: bobbobbins, did that 20 minutes of silence answer your question ;)
[23:53:09] smathy: lampd1, y'know who knows a lot about Spree apps? Radar
[23:53:11] iooner: has joined #RubyOnRails
[23:53:15] charliesome: has joined #RubyOnRails
[23:55:07] timdotrb: ACTION chuckles at smathy's response
[23:57:41] chrisarcand: has joined #RubyOnRails