« Back to channel list

#RubyOnRails - 03 February 2016

« Back 1 day Forward 1 day »
[00:01:32] iammiles: has joined #RubyOnRails
[00:01:48] Rodya_: has joined #RubyOnRails
[00:02:17] aaronmoodie: has joined #RubyOnRails
[00:05:20] dmz: has joined #RubyOnRails
[00:07:11] dmz: has left #RubyOnRails: ()
[00:07:33] dm_24: has joined #RubyOnRails
[00:08:14] underplank: has joined #RubyOnRails
[00:08:17] underplank: Hi, I have two Active record models Foo and Bar, with a belongs_to relationship. When using as_json I can include Bar in Foo, but its nested. is there a way to select a column from Bar and have it as a top level in Foo?
[00:08:34] dm_24: anyone here use devise token auth?
[00:10:31] dm_24: underplank: maybe create your own object to return after you use as_json.... so like data.foo = foo.select(:any, :param, :you, :want) --- data.bar = foo.bar.select
[00:10:33] iateadonut: has joined #RubyOnRails
[00:11:56] pawnbox: has joined #RubyOnRails
[00:13:06] k13nox: has joined #RubyOnRails
[00:13:14] dm_24: I'm trying to re-authenticate the user with additional scopes, using devise token auth/ng-token-auth for angular, if anyone can help
[00:13:41] legohead: has joined #RubyOnRails
[00:14:01] dm_24: same provider strategy, same user account, but a secondary login button that will give offline access
[00:14:39] smathy: rakm, you can probably convert them with some equivalent to this: "Accept\xe9.zip".force_encoding("ISO-8859-1").encode("UTF-8")
[00:15:14] ravster: has joined #RubyOnRails
[00:15:51] K_r3aPeR: has joined #RubyOnRails
[00:16:31] rakm: nice, i just did it all manually, there weren't that many, but i guessed that all the \x character sequences were hex and converted them
[00:19:57] B1n4r10: has joined #RubyOnRails
[00:21:05] kirillzh: has joined #RubyOnRails
[00:21:46] Muimi: has joined #RubyOnRails
[00:22:07] Muimi: where's your guys' pastebin?
[00:22:11] nettoweb: has joined #RubyOnRails
[00:22:15] Timberwo|f: has joined #RubyOnRails
[00:22:51] Timberwo|f: has left #RubyOnRails: ("Textual.")
[00:23:02] Timberwo|f: has joined #RubyOnRails
[00:24:32] smathy: Muimi, use gist.
[00:25:02] Muimi: i think i didn't install rails correctly due to the Could not find gem 'sqlite3 (>= 0) ruby' in the gems available on this machine. error.
[00:25:33] Muimi: The stackoverflow article i'm reading right now about that says I should run bundle install from the app directory.... which i have done. i also tried from the ruby directory, but that failed.
[00:26:46] Oliphaunte: has joined #RubyOnRails
[00:28:30] pwnd_nsfw: Muimi, bundle install didn't spit out any errors?
[00:28:39] Muimi: Ah, here we are: http://stackoverflow.com/questions/18063777/geminstallerextensionbuilderror-error-failed-to-build-gem-native-extension
[00:29:06] pwnd_nsfw: that' for pg though
[00:29:07] Muimi: To me it made sense to install it as a root user. :/ Just set up a new server.
[00:29:25] Muimi: that makes absolutely no sense to me.
[00:29:35] pwnd_nsfw: sudo bundle install rifk
[00:29:52] Muimi: so would that fix it without me needing to completely remove ruby on rails and ruby and reinstall them/
[00:30:01] pwnd_nsfw: "fix", maybe
[00:30:34] Muimi: it says: ERROR: "bundle install" was called with arguments ["rifk"]
[00:31:03] atomical_: has joined #RubyOnRails
[00:33:20] pwnd_nsfw: rifk = rofl
[00:36:05] hahuang65: has joined #RubyOnRails
[00:36:57] pwnd_nsfw: Muimi, any luck?
[00:37:16] neshmi_: has joined #RubyOnRails
[00:37:47] mostlybadfly: has joined #RubyOnRails
[00:39:03] pavelz_: has left #RubyOnRails: ()
[00:41:22] lemur: has joined #RubyOnRails
[00:41:36] pawnbox: has joined #RubyOnRails
[00:43:14] ^CrYpto^: has joined #RubyOnRails
[00:44:02] wldcordeiro: has joined #RubyOnRails
[00:44:53] k13nox: has joined #RubyOnRails
[00:48:47] TheMonster_: has left #RubyOnRails: ("Konversation terminated!")
[00:53:53] madebymarkca: has joined #RubyOnRails
[00:54:07] phroa`: has joined #RubyOnRails
[00:57:46] kirillzh: has joined #RubyOnRails
[01:03:33] moeabdol: has joined #RubyOnRails
[01:06:31] yoongkang: has joined #RubyOnRails
[01:09:21] bronson: has joined #RubyOnRails
[01:10:31] sevenseacat: has joined #RubyOnRails
[01:10:58] brycesenz: has joined #RubyOnRails
[01:11:02] atomical: has joined #RubyOnRails
[01:11:25] moeabdol1: has joined #RubyOnRails
[01:12:10] craysiii: has joined #RubyOnRails
[01:13:05] Rodya_: has joined #RubyOnRails
[01:13:22] akahn: has joined #RubyOnRails
[01:13:36] atomical_: has joined #RubyOnRails
[01:13:45] akahn: if I'm within a `with_connection` block will any use of ActiveRecord models within that block use the connection I've checked out?
[01:14:25] legohead: has joined #RubyOnRails
[01:16:45] mag42c_: has joined #RubyOnRails
[01:17:45] tenderlove: has joined #RubyOnRails
[01:18:22] Rodya_: has joined #RubyOnRails
[01:18:36] Oliphaunte: has joined #RubyOnRails
[01:19:18] jfelchner: has joined #RubyOnRails
[01:21:47] Rodya_: has joined #RubyOnRails
[01:22:30] Oliphaun_: has joined #RubyOnRails
[01:23:11] rogue_koder: has joined #RubyOnRails
[01:24:31] Rodya_: has joined #RubyOnRails
[01:25:05] baweaver: has joined #RubyOnRails
[01:28:01] Synthead: what's the best column type for storing serialized ruby objects? can I use a blob type?
[01:30:15] smathy: Synthead, yeah, blob or text.
[01:31:09] Synthead: smathy: is "binary" what rails calls a blob type?
[01:31:10] DLSteve: has joined #RubyOnRails
[01:34:14] uris: has joined #RubyOnRails
[01:34:28] smathy: Synthead, heh, I don't know actually. I always use text :)
[01:34:54] Synthead: smathy: haha, alright :) I'll experiment. thanks!
[01:35:18] jacksparrow007: has joined #RubyOnRails
[01:35:38] smathy: Synthead, it'll be in the column docs.
[01:36:02] smathy: :binary apparently: http://devdocs.io/rails/activerecord/connectionadapters/tabledefinition#method-i-column
[01:36:44] hahuang65: has joined #RubyOnRails
[01:39:12] Rodya_: has joined #RubyOnRails
[01:39:28] _Tariq: has joined #RubyOnRails
[01:39:33] dopie: is this a good way of implementing what im trying to do?
[01:39:33] dopie: https://gist.github.com/staycreativedesign/0708ed62317d1486e95b#comments
[01:39:34] kirillzh: has joined #RubyOnRails
[01:43:22] Scriptonaut: has joined #RubyOnRails
[01:46:00] meves: has joined #RubyOnRails
[01:46:09] Scriptonaut: has left #RubyOnRails: ()
[01:48:07] rhizome: explain what you're trying to do in one or two sentences
[01:48:41] atomical: has joined #RubyOnRails
[01:51:14] pawnbox: has joined #RubyOnRails
[01:53:14] smathy: has joined #RubyOnRails
[01:53:45] uris: has joined #RubyOnRails
[01:57:14] superlou: has joined #RubyOnRails
[01:58:18] jottr_: has joined #RubyOnRails
[01:58:35] DEA7TH: has joined #RubyOnRails
[01:59:42] hahuang65: has joined #RubyOnRails
[02:00:29] emachnic: has joined #RubyOnRails
[02:02:41] aaronmoodie: has joined #RubyOnRails
[02:05:46] uris: has joined #RubyOnRails
[02:11:52] dcunit3d: has joined #RubyOnRails
[02:12:03] dcunit3d: hey if you want to use emacs on rails, do you guys have any suggestions?
[02:12:12] ferz_: has joined #RubyOnRails
[02:15:11] legohead: has joined #RubyOnRails
[02:16:11] ravster: has joined #RubyOnRails
[02:18:36] Bloomer: has joined #RubyOnRails
[02:20:28] NBarnes: has joined #RubyOnRails
[02:21:06] Alazoral: has joined #RubyOnRails
[02:22:14] DEA7TH: has joined #RubyOnRails
[02:22:14] NBarnes: has joined #RubyOnRails
[02:24:28] uris: has joined #RubyOnRails
[02:25:17] atomical: has joined #RubyOnRails
[02:26:19] NBarnes: has joined #RubyOnRails
[02:26:37] yoongkang: has joined #RubyOnRails
[02:27:44] rhizome: some do, i don't know what plugins they use or anything. i'm sure there's some pages out there about it
[02:29:14] sankaber: has joined #RubyOnRails
[02:31:07] cassioscabral: has joined #RubyOnRails
[02:32:56] NBarnes: has joined #RubyOnRails
[02:34:37] NBarnes: has joined #RubyOnRails
[02:37:59] NBarnes: has joined #RubyOnRails
[02:39:11] sleungcy: has joined #RubyOnRails
[02:41:50] sankaber: has joined #RubyOnRails
[02:42:09] baweaver: has joined #RubyOnRails
[02:43:11] NBarnes: has joined #RubyOnRails
[02:44:07] swillits: has left #RubyOnRails: ()
[02:46:41] NBarnes: has joined #RubyOnRails
[02:46:47] moeabdol2: has joined #RubyOnRails
[02:47:37] Oliphaunte: has joined #RubyOnRails
[02:48:26] Synthead: in couchbase-model, is there a way I can do MyModelClass.all?
[02:54:19] Bloomer: has joined #RubyOnRails
[02:56:22] dopamean_: has joined #RubyOnRails
[02:56:43] NBarnes: has joined #RubyOnRails
[02:57:19] jgt2: has joined #RubyOnRails
[02:57:46] dangeranger: has joined #RubyOnRails
[02:58:35] NBarnes: has joined #RubyOnRails
[02:59:08] CocoJumbo: has joined #RubyOnRails
[02:59:09] chouhoulis: has joined #RubyOnRails
[02:59:55] rhizome: i should hope so
[03:02:49] NBarnes: has joined #RubyOnRails
[03:03:40] meves: has joined #RubyOnRails
[03:07:06] Arcaire: has joined #RubyOnRails
[03:09:01] shmilan: has joined #RubyOnRails
[03:09:24] Bloomer: has joined #RubyOnRails
[03:09:42] NBarnes: has joined #RubyOnRails
[03:14:25] NBarnes: has joined #RubyOnRails
[03:15:28] dopie: Hey does anyone have another solution to this Exploring the World of Lucid Dreaming
[03:15:35] dopie: https://gist.github.com/staycreativedesign/0708ed62317d1486e95b
[03:15:44] dopie: errr oooops
[03:15:57] legohead: has joined #RubyOnRails
[03:16:38] thegauraw: has joined #RubyOnRails
[03:20:21] atomical: has joined #RubyOnRails
[03:21:21] uris: has joined #RubyOnRails
[03:21:59] drupald: has joined #RubyOnRails
[03:26:11] KensoDev: has joined #RubyOnRails
[03:27:45] uris: has joined #RubyOnRails
[03:28:54] safetypin: has joined #RubyOnRails
[03:31:00] GreekFreak: has joined #RubyOnRails
[03:31:07] dcunit3d: for emacs, i know there's projectile-rails, but i don't have emacs configured with project. there's also rinari, which i used a few years ago. i can search online, but for this kind of stuff, the info i get is spread out and not very good
[03:31:29] dcunit3d: i might ask in the emacs channel
[03:31:34] shmilan: has joined #RubyOnRails
[03:32:16] sneakerhax: has joined #RubyOnRails
[03:32:24] GreekFreak: I've been trying to deploy my app on an Apache server with Passenger (and using ISPConfig). I keep getting the following error on deploy: "There are no Phusion Passenger-served applications running whose paths begin with '/var/www/clients/client1/web1/web/my_app'" Any advice would be appreciated
[03:33:49] WhereIsMySpoon_: has joined #RubyOnRails
[03:35:10] uris: has joined #RubyOnRails
[03:35:42] pawnbox: has joined #RubyOnRails
[03:36:12] jacksparrow007: has joined #RubyOnRails
[03:37:52] uris: has joined #RubyOnRails
[03:40:13] jackspar_: has joined #RubyOnRails
[03:49:21] creyes: has joined #RubyOnRails
[03:49:27] NBarnes: has joined #RubyOnRails
[03:49:40] Ropeney: GreekFreak, will need your config files uploaded, but arent you meant to point it to /public in your app folder?
[03:52:20] creyes: I've been generating graphs with morrisjs... Now I want to send them as weekly reports in an email. From what I can tell, most email clients (gmail) don't support js so is there a way I can turn those into an image/css to send?
[03:52:30] exadeci: has joined #RubyOnRails
[03:52:57] shmilan: has joined #RubyOnRails
[03:53:09] askhat: has joined #RubyOnRails
[03:55:54] GreekFreak: Ropeney, I just noticed that too and I'm busy changing the config files to test it
[03:55:59] catcher: has joined #RubyOnRails
[03:56:46] catcher: I want to set a model scope to pull out a random item from the table. Any suggestions?
[03:58:17] jgt2: has joined #RubyOnRails
[04:00:08] Ropeney: catcher: Something like `Model.offset(rand(Model.count)).first` ?
[04:01:23] Ropeney: catcher: or possibly better solution `Model.order("RANDOM()").first` :D
[04:02:14] catcher: Ropeney: can you use the model like that in a scope? I opted against the ordering because efficiency.
[04:02:27] rhizome: never order by random()
[04:02:34] Ropeney: why not rhizome ?
[04:02:52] catcher: because efficiency
[04:03:27] rhizome: i think i'm going off of http://www.titov.net/2005/09/21/do-not-use-order-by-rand-or-how-to-get-random-rows-from-table/
[04:03:39] rhizome: but google indicates some controversy
[04:04:07] rhizome: but really: Model.sample(5)
[04:04:36] Ropeney: http://stackoverflow.com/questions/2752231/random-record-in-activerecord seems to indicate 2.5x faster, but just someoens answer though
[04:04:48] CocoJumbo: hello guys, i learn rails, can't include bootsrap by this guide http://stackoverflow.com/questions/18371318/installing-bootstrap-3-on-rails-app, on my test site not includes bootsrap styles
[04:04:49] rhizome: you know how someones can be
[04:05:03] Ropeney: the offset does hit the DB twice though
[04:05:33] catcher: Ropeney: that's not available via a scope though, no?
[04:05:59] rhizome: not sure how you're supposed to get a list of valid things to select without two queries
[04:06:09] dopie: does anyone have a better solution for this
[04:06:10] dopie: https://gist.github.com/staycreativedesign/0708ed62317d1486e95b
[04:06:24] rhizome: dopie: i know you can ask a better question than that
[04:06:36] baweaver: has joined #RubyOnRails
[04:06:58] jottr_: has joined #RubyOnRails
[04:07:11] dopie: rhizome: man ... I think the gist pretty much sums it up pretty good
[04:08:30] krz: has joined #RubyOnRails
[04:08:34] Ropeney: catcher: `scope :random, -> { offset(rand(self.count)) }
[04:08:47] ^CrYpto^: has joined #RubyOnRails
[04:08:59] catcher: mm, self, I'll give that a go. Thanks.
[04:09:21] catcher: @Ropeney ^
[04:10:17] catcher: has left #RubyOnRails: ()
[04:10:21] NBarnes: has joined #RubyOnRails
[04:11:53] K_r3aPeR: has joined #RubyOnRails
[04:12:28] User458764: has joined #RubyOnRails
[04:12:47] sevenseacat: has joined #RubyOnRails
[04:15:07] nbdy: has joined #RubyOnRails
[04:16:34] rhizome: dopie: too long
[04:16:35] braincrash: has joined #RubyOnRails
[04:16:38] legohead: has joined #RubyOnRails
[04:16:38] ravster: has joined #RubyOnRails
[04:19:54] dopie: rhizome: what is too long?
[04:20:32] sleungcy: has joined #RubyOnRails
[04:21:01] CocoJumbo: i solve my problem with bootstrap need put string *= require bootstrap.min to commented block in application.css
[04:22:10] shmilan: has joined #RubyOnRails
[04:24:23] sleungcy: has joined #RubyOnRails
[04:25:37] EduardoBautista: has joined #RubyOnRails
[04:26:01] moeabdol3: has joined #RubyOnRails
[04:28:23] jacksparrow007: has joined #RubyOnRails
[04:29:15] yoongkang: has joined #RubyOnRails
[04:30:30] rogue_koder: has joined #RubyOnRails
[04:33:12] Pulp: has joined #RubyOnRails
[04:34:39] yfeldblum: has joined #RubyOnRails
[04:36:36] rhizome: dopie: that whole thing
[04:37:07] dopie: well usually everyone complains of vaguenesss :)
[04:38:16] meves: has joined #RubyOnRails
[04:38:51] meves_: has joined #RubyOnRails
[04:40:22] AnoHito: has joined #RubyOnRails
[04:43:28] codedmart: has joined #RubyOnRails
[04:44:37] Mia: has joined #RubyOnRails
[04:45:36] Grundell: has joined #RubyOnRails
[04:47:25] krz: has joined #RubyOnRails
[04:47:27] barhum2013: has joined #RubyOnRails
[04:48:35] kirillzh: has joined #RubyOnRails
[04:49:53] Eswar: has joined #RubyOnRails
[04:58:22] ziggy: has joined #RubyOnRails
[04:59:19] jgt2: has joined #RubyOnRails
[05:00:15] ElSif: has joined #RubyOnRails
[05:03:26] ashishjain: has joined #RubyOnRails
[05:07:11] mustmodify: has left #RubyOnRails: ()
[05:10:04] EMCHAMP_: has joined #RubyOnRails
[05:10:45] bronson: has joined #RubyOnRails
[05:13:07] croc: has joined #RubyOnRails
[05:17:28] legohead: has joined #RubyOnRails
[05:19:03] moeabdol: has joined #RubyOnRails
[05:21:51] Eswar: has joined #RubyOnRails
[05:21:58] nk121: has joined #RubyOnRails
[05:22:52] duderonomy: has joined #RubyOnRails
[05:23:48] bga57: has joined #RubyOnRails
[05:26:16] sarink: has joined #RubyOnRails
[05:26:51] rhizome: vagueness isn't a function of length
[05:27:14] dcunit3d: hey i just created a Rails 5 project and i'm running into some issues with LoggerSilence. i think it's a threading issue. i've looked around at issues on rails github, but haven't found much to match it.
[05:27:27] arBmind: has joined #RubyOnRails
[05:27:33] dcunit3d: except for this issue, which is similar to what i'm going through, i think. https://github.com/rails/rails/pull/22969
[05:28:19] baweaver: General question on querying: Say I have a Buildset which has_many builds through BuildsetBuild. How would be the best way to find a Buildset which contains exactly 2 distinct builds?
[05:28:36] rhizome: that's a lot of builds
[05:28:52] baweaver: dcunit3d: at this point, rails 5 is still fairly beta, so submit issues for it.
[05:29:28] baweaver: rhizome: in the neighborhood of tens of thousands probably by now
[05:29:50] rhizome: are you sure that's not excessive
[05:30:11] baweaver: blame Jenkins and app teams deploying
[05:30:23] dcunit3d: baweaver, i'm not sure it's an issue though. i think it's like a race condition or something that's blowing up bc of a conflict with a gem
[05:31:05] baweaver: best I can figure is to query against the joins model and try and aggregate the thing.
[05:32:09] dcunit3d: basically, `local_levels` is nil at line 23. i think it's because the `after_initialize` hasn't been called. but because the stack is blowing up here, i can't really tell what it's doing before it blows up in the logger. https://github.com/rails/rails/blob/master/activesupport/lib/active_support/logger_silence.rb#L23
[05:34:03] dcunit3d: but it works on a fresh `rails new foo` project
[05:34:30] baweaver: callbacks tend to tall behind creation.
[05:37:36] arup_r: has joined #RubyOnRails
[05:38:06] barhum2013: has joined #RubyOnRails
[05:39:14] apotry: has joined #RubyOnRails
[05:39:35] yfeldblum: has joined #RubyOnRails
[05:39:45] baweaver: ACTION is creating a test project to try and find a better way to query like that
[05:42:10] yfeldblum: has joined #RubyOnRails
[05:42:46] moei: has joined #RubyOnRails
[05:44:51] dcunit3d: hmmm, seems to be ok when i start up within puma
[05:46:16] rvanlieshout: has joined #RubyOnRails
[05:47:32] krz: has joined #RubyOnRails
[05:49:08] quazimodo: has joined #RubyOnRails
[05:49:34] Muimi: has joined #RubyOnRails
[05:52:30] moeabdol1: has joined #RubyOnRails
[05:52:50] Eswar: has joined #RubyOnRails
[05:53:14] k13nox: has joined #RubyOnRails
[05:54:05] emachnic: has joined #RubyOnRails
[05:56:40] iateadonut: has left #RubyOnRails: ()
[05:59:13] moeabdol2: has joined #RubyOnRails
[06:00:10] jgt2: has joined #RubyOnRails
[06:02:51] iateadonut: has joined #RubyOnRails
[06:03:19] PedramT: has joined #RubyOnRails
[06:03:32] iateadonut: has left #RubyOnRails: ()
[06:06:39] mdw: has joined #RubyOnRails
[06:06:49] Axy: has joined #RubyOnRails
[06:08:51] neshmi_: has joined #RubyOnRails
[06:09:01] jottr_: has joined #RubyOnRails
[06:14:33] n00bDev: has joined #RubyOnRails
[06:16:44] Sadin: has joined #RubyOnRails
[06:17:26] Eswar: has joined #RubyOnRails
[06:17:35] ravster: has joined #RubyOnRails
[06:18:10] legohead: has joined #RubyOnRails
[06:21:29] baweaver: has joined #RubyOnRails
[06:22:53] lemur: has joined #RubyOnRails
[06:22:56] PedramT: has joined #RubyOnRails
[06:22:56] mary5030: has joined #RubyOnRails
[06:23:18] ur5us: has joined #RubyOnRails
[06:28:47] jacksparrow007: has joined #RubyOnRails
[06:29:58] yoongkang: has joined #RubyOnRails
[06:31:22] ur5us: has joined #RubyOnRails
[06:31:28] PedramT: has joined #RubyOnRails
[06:32:48] aganov: has joined #RubyOnRails
[06:32:51] speakingcode: has joined #RubyOnRails
[06:33:29] wethu: afternoon
[06:42:16] atmosx: has joined #RubyOnRails
[06:42:34] atmosx: arup_r: you alive?
[06:42:36] atmosx: hello ppl
[06:44:40] atmosx: I have to JS plugins which do not play well together. I want to make a work-around and when Plugin1 is available, disable Plugin2, where is the best place to put such a code in Rails?
[06:45:48] sevenseacat: that... doesnt make a lot of sense
[06:46:00] sevenseacat: if you have plugins that don't play nice, you fix them
[06:46:05] rvanlieshout: or stop using them
[06:46:29] arup_r: atmosx: yes sir
[06:46:40] atmosx: sevenseacat: I am planing to, but a workaround would be nice for the time being.
[06:46:48] sevenseacat: that doesnt make sense.
[06:47:06] atmosx: sevenseacat: okay
[06:47:09] sevenseacat: your plugins are always available, so plugin 2 should just be removed.
[06:47:24] atmosx: arup_r: how's life?
[06:48:17] arup_r: atmosx: better .. :)
[06:48:24] atmosx: arup_r: awesome!
[06:49:08] dcunit3d: hey, for action cable, how many clients can connect to one port?
[06:49:40] dcunit3d: is that even a concern? also, how many websockets can one ActionCable server instance manage, typically?
[06:49:41] arup_r: sevenseacat: why not beyond it ?
[06:49:47] arup_r: just asking..
[06:49:50] hahuang65: has joined #RubyOnRails
[06:49:53] sevenseacat: arup_r: because i totally made that number up
[06:50:44] dcunit3d: i had heard there was general limit on the number of websockets per server for any framework. and that the max was a bit low, so websockets were hard to scale. is that right?
[06:53:18] matthewd: dcunit3d: I know of no concrete limitation that would kick in before `ulimit -n`
[06:53:41] matthewd: As for what's actually practical, you'd probably need to measure it
[06:54:13] dpsk: has joined #RubyOnRails
[06:54:32] lemur: has joined #RubyOnRails
[06:54:42] dcunit3d: cool, thanks sevenseacat matthewd
[06:55:00] dcunit3d: j/w, probably not going to run into that for a minute. but it doesn't seem too hard to scale
[06:56:07] MrSamuel: has joined #RubyOnRails
[06:56:23] MrSamuel: Hi, is there any way to have a polymorphic belongs_to with a custom type mapping for legacy data?
[06:57:13] yfeldblum: has joined #RubyOnRails
[06:59:14] arup_r: has left #RubyOnRails: ()
[06:59:43] jahbrewski: has joined #RubyOnRails
[06:59:43] arup_r: has joined #RubyOnRails
[06:59:58] arup_r: MrSamuel: custom type means ?
[07:02:21] MrSamuel: arup_r, things which aren't class names
[07:02:26] MrSamuel: like, the class is Category
[07:02:29] MrSamuel: but the type name is cat
[07:02:38] MrSamuel: this is from a legacy database
[07:03:17] arup_r: MrSamuel: There are options to tell Rails where to go and find.. You can use those options
[07:03:23] matthewd: MrSamuel: Nothing supported.. though I think I've seen hacks that attempt it
[07:04:08] arup_r: oh I see.
[07:05:14] solars: has joined #RubyOnRails
[07:05:50] tvw: has joined #RubyOnRails
[07:06:53] Cervajz_: has joined #RubyOnRails
[07:07:05] PedramT: has joined #RubyOnRails
[07:08:05] MrSamuel: arup_r, what do you mean options to tell Rails where to go and find?
[07:08:11] Palsson: has joined #RubyOnRails
[07:10:15] arup_r: MrSamuel: like some times Rails can't figure out the source class names, then we need to say it explicitly.. see as an example, how here OP constructed his relationships by adding explicit options http://stackoverflow.com/q/35156244/2767755
[07:10:28] arup_r: this is just as an example, not a direct answer to you.
[07:11:04] PedramT: has joined #RubyOnRails
[07:11:05] arup_r: I stopped because matthewd said, no such way exists. :) I obey his Rails expertise.
[07:12:51] zarubin: has joined #RubyOnRails
[07:13:34] roshanavand: has joined #RubyOnRails
[07:14:04] mhoungbo: has joined #RubyOnRails
[07:14:45] roshanavand: has joined #RubyOnRails
[07:15:27] roshanavand: has joined #RubyOnRails
[07:16:07] sarink: has joined #RubyOnRails
[07:17:17] rhizome: MrSamuel: i think you could create models for that stuff and use set_table_name
[07:18:14] sandstrom: has joined #RubyOnRails
[07:18:56] legohead: has joined #RubyOnRails
[07:19:01] PedramT_: has joined #RubyOnRails
[07:19:06] scepticulous: has joined #RubyOnRails
[07:20:37] PedramT: has joined #RubyOnRails
[07:23:31] nodejunkie: has joined #RubyOnRails
[07:23:58] agoldboi: has joined #RubyOnRails
[07:27:21] Eswar: has joined #RubyOnRails
[07:29:57] wethu: has joined #RubyOnRails
[07:33:32] sheeny_: has joined #RubyOnRails
[07:34:00] sheeny_: Could anyone explain to me or help with why this won't work in RSpec: https://gist.github.com/craigsheen/f7b78ec6282a74d0ad70
[07:35:54] tetraktys: has joined #RubyOnRails
[07:37:39] arup_r: sheeny_: because you said, Rspec expect(SomeClass).to receive(:new).with(:number_one) once.. but your call expect(SomeClass).to receive(:new).with(:number_one).and_return(SomeClass.new(:number_one)).once makes the same call with same argument twice
[07:38:07] sevenseacat: your example is flawed - you're not actually running any code to verify any expectations
[07:38:21] sheeny_: sevenseacat: just updated that - spotted the mistake
[07:38:51] Pazician: has joined #RubyOnRails
[07:39:26] arup_r: sheeny_: myself still true.. this call and_return(SomeClass.new(:number_one)) is breaking.
[07:39:56] sevenseacat: I think your approach is still wrong, for the reasons arup_r gives
[07:40:04] arup_r: the same call you are making once inside RspecProblem#run and second time .and_return()
[07:40:05] sevenseacat: you're stubbing a method and then trying to call that same method
[07:40:31] sheeny_: ahh! you're right
[07:40:47] jacksparrow007: has joined #RubyOnRails
[07:40:58] defsdoor: has joined #RubyOnRails
[07:41:21] arup_r: It will pass expect(SomeClass).to receive(:new).with(:number_one).once
[07:41:42] arup_r: dunno know if you need the and_return() really
[07:41:51] baweaver: expect(foo).to receive(bar); foo.bar
[07:41:53] sevenseacat: or use .and_call_original if you want to call the original method
[07:41:55] sheeny_: in the return I have changed it to return a double
[07:42:07] arup_r: because I hope you are storing the argument to some instance var.. so you have access to use it later
[07:42:24] darutoko: has joined #RubyOnRails
[07:42:28] ur5us: has joined #RubyOnRails
[07:42:45] PedramT: has joined #RubyOnRails
[07:43:28] sheeny_: i am - thank you guys! lifesavers!
[07:44:40] juddey: has joined #RubyOnRails
[07:44:43] jahbrewski: has joined #RubyOnRails
[07:45:39] mary5030: has joined #RubyOnRails
[07:50:48] eGGsha: has joined #RubyOnRails
[07:51:48] Bloomer: has joined #RubyOnRails
[07:53:03] Bloomer: has joined #RubyOnRails
[07:54:36] bruce_lee: has joined #RubyOnRails
[07:57:04] IrishGringo: has joined #RubyOnRails
[07:58:12] defsdoor: has joined #RubyOnRails
[08:00:30] Spami: has joined #RubyOnRails
[08:00:41] yoongkang: has joined #RubyOnRails
[08:00:48] jgt2: has joined #RubyOnRails
[08:01:38] Cervajz: has joined #RubyOnRails
[08:02:01] ashishjain: has joined #RubyOnRails
[08:03:17] vanne: has joined #RubyOnRails
[08:06:44] ql6wlld: has joined #RubyOnRails
[08:08:31] SanguineAnomaly: has joined #RubyOnRails
[08:09:15] tetraktys: has joined #RubyOnRails
[08:09:46] jottr_: has joined #RubyOnRails
[08:13:07] vanne: is there a way to log out a specific user from the server side? assuming sessions are in a redis/AR store
[08:13:57] mices: has joined #RubyOnRails
[08:13:58] vanne: i guess the session key does not tell me what user the session belongs to
[08:14:04] mdw: has joined #RubyOnRails
[08:14:45] jahbrewski: has joined #RubyOnRails
[08:16:33] mices: has joined #RubyOnRails
[08:16:35] mices: i'm trying to follow this tutorial https://medium.com/rails-ember-beyond/how-to-build-a-social-network-using-rails-eb31da569233#.cdojrtwvg but on line 1 of _form.html.erb for likes the author says <% if current_user.liked? likeable %> i had been trying to figure out what that meant and when i ran the app it raised the error undefined method likeable
[08:17:09] theod: has joined #RubyOnRails
[08:18:31] ravster: has joined #RubyOnRails
[08:19:43] legohead: has joined #RubyOnRails
[08:21:15] mdw: has joined #RubyOnRails
[08:22:07] srinidhi: has joined #RubyOnRails
[08:22:19] dpsk1: has joined #RubyOnRails
[08:22:43] sleungcy: has joined #RubyOnRails
[08:24:29] User458764: has joined #RubyOnRails
[08:29:34] sandstrom: has joined #RubyOnRails
[08:29:49] JonasRothmann: has joined #RubyOnRails
[08:30:26] ur5us: has joined #RubyOnRails
[08:30:34] Macaveli: has joined #RubyOnRails
[08:32:41] JonasRothmann: Hey! I am having an issue... My custom resource sort doesn't seem do work, as it wants to be like this: "http://localhost:3000/1/sort" but I want it to be "http://localhost:3000/sort"
[08:33:51] tbuehlmann: JonasRothmann, would you gist your config/routes.rb file, please?
[08:34:27] rvanlieshout: and add the output of rake routes
[08:35:12] JonasRothmann: https://gist.github.com/jonasrh/72c0f5b575b3ed4c6b3d
[08:35:53] tbuehlmann: make it a `get :sort, on: :collection`
[08:37:32] adac: has joined #RubyOnRails
[08:37:36] qejk: has joined #RubyOnRails
[08:40:04] dpsk1: has joined #RubyOnRails
[08:44:45] jahbrewski: has joined #RubyOnRails
[08:48:06] ashishjain: has left #RubyOnRails: ("Leaving")
[08:53:25] nettoweb: has joined #RubyOnRails
[08:55:35] antgel: has joined #RubyOnRails
[08:59:11] rogue_koder: has joined #RubyOnRails
[08:59:52] FLeiXiuS: has joined #RubyOnRails
[09:00:35] yardenbar: has joined #RubyOnRails
[09:00:48] craysiii: has joined #RubyOnRails
[09:02:23] Macaveli: has joined #RubyOnRails
[09:03:39] astrofog: has joined #RubyOnRails
[09:05:31] craysiii: has joined #RubyOnRails
[09:06:07] sandstrom: has joined #RubyOnRails
[09:10:24] PedramT: has joined #RubyOnRails
[09:10:38] legohead: has joined #RubyOnRails
[09:11:54] jgt2: has joined #RubyOnRails
[09:13:38] Palsson: has joined #RubyOnRails
[09:14:45] jahbrewski: has joined #RubyOnRails
[09:15:48] zpe: has joined #RubyOnRails
[09:16:31] jsrn_: has joined #RubyOnRails
[09:16:43] dionysus69: has joined #RubyOnRails
[09:17:34] k13nox_: has joined #RubyOnRails
[09:18:33] mark3: has joined #RubyOnRails
[09:19:49] zpe_: has joined #RubyOnRails
[09:19:50] eml: has joined #RubyOnRails
[09:20:06] mark3: has joined #RubyOnRails
[09:20:58] mark3: has joined #RubyOnRails
[09:22:20] futilegames: has joined #RubyOnRails
[09:24:28] marr: has joined #RubyOnRails
[09:28:09] sandstrom: has joined #RubyOnRails
[09:30:05] cleopatra: has joined #RubyOnRails
[09:30:44] Sylario: has joined #RubyOnRails
[09:33:01] tetraktys: has joined #RubyOnRails
[09:34:17] futilegames: has joined #RubyOnRails
[09:35:19] mary5030: has joined #RubyOnRails
[09:36:39] zyzioziom: has joined #RubyOnRails
[09:36:51] yoongkang: has joined #RubyOnRails
[09:36:52] emachnic: has joined #RubyOnRails
[09:37:53] DoubleMalt: has joined #RubyOnRails
[09:45:05] kitsuneyo: has joined #RubyOnRails
[09:50:23] atmosx: Any idea why this doesn't work? https://gist.github.com/atmosx/138d4ded323d670e5085
[09:52:26] bruce_lee: has joined #RubyOnRails
[09:53:00] User458764: has joined #RubyOnRails
[09:53:36] tbuehlmann: `("textile"||"markdown")` always returns "textile", is that intended?
[09:54:11] GeorgesLeYeti: has joined #RubyOnRails
[09:54:15] atmosx: tbuehlmann: ah no
[09:54:28] lyoshajapan: has joined #RubyOnRails
[09:54:43] kitsuneyo: what do you guys think about storing ruby hashes in db columns?
[09:55:01] rvanlieshout: kitsuneyo: ok if you use a hstore or jsonb column and you don't need to query on it
[09:55:18] tbuehlmann: rvanlieshout, thanks a lot
[09:55:42] atmosx: tbuehlmann: if (Setting.text_formatting == "textile"|| Setting.text_formatting == "markdown") like that?
[09:55:45] kitsuneyo: i have a names table, and i was going to have separate columns for last_name, first_name etc. but then i thought it may be better to use a hash...
[09:56:26] kitsuneyo: rvanlieshout... i don't know what hstore or jsonb are >.<;
[09:56:48] kerunaru: has joined #RubyOnRails
[09:57:00] lyoshajapan: Hey there :-)
[09:57:11] lyoshajapan: If I get an object in debugger looking something like this: #<#<Class*0x00734534534>::0x00fe09e8098e> how do I find how was it generated?
[09:57:14] rvanlieshout: kitsuneyo: why do you want to store an hash in a single db column?
[09:57:19] jacksparrow007: has joined #RubyOnRails
[09:57:47] tbuehlmann: atmosx, looks better. you could also go with `Setting.text_formatting.in?(['textile', 'markdown']) or `['textile', 'markdown'].include?(Setting.text_formatting)`
[09:58:14] atmosx: hm, okay.
[09:58:17] kitsuneyo: rvanlieshout i don't know, i'm still learning about rails and just thinking of different possibilities
[09:58:26] fox_mulder_cp: has joined #RubyOnRails
[09:58:44] rvanlieshout: kitsuneyo: it's not realated to rails
[09:58:46] n00bDev: has joined #RubyOnRails
[09:58:56] kitsuneyo: i noticed that carrierwave will store upload data in a hash in a single column, and it's easy to retrieve it
[09:59:09] rvanlieshout: it doesn't store it in a hash
[09:59:11] kitsuneyo: learning about ruby/rails/general development then
[09:59:12] rvanlieshout: it just stores the filename in the db
[09:59:24] rvanlieshout: but how you should store things in a db is a db concern
[09:59:27] dcunit3d: has joined #RubyOnRails
[09:59:39] kitsuneyo: true rvanlieshout
[09:59:41] jahbrewski: has joined #RubyOnRails
[09:59:52] kitsuneyo: i think it stores more than the filename
[10:00:26] rvanlieshout: what's the column type in the db?
[10:00:47] kitsuneyo: lemme just check in rails console
[10:00:53] rvanlieshout: rails dbconsole
[10:01:08] rvanlieshout: not the typecasted converted whanot-done-to-it version that a model has
[10:02:24] Cervajz_: has joined #RubyOnRails
[10:02:36] kitsuneyo: you're right
[10:02:46] rrawlins: has joined #RubyOnRails
[10:02:53] kitsuneyo: it must generate all the other data with ruby methods
[10:03:20] rvanlieshout: exactly. and that's quite normal
[10:03:50] kitsuneyo: i guess i can just do that with my model
[10:04:01] kitsuneyo: thanks rvanlieshout
[10:04:02] n00bDev: im my model validation im allowing_blank: true nested inside a numericalty check.... but when i submit the form its complaining a empty string is not valid
[10:04:11] rvanlieshout: kitsuneyo: why would you need that?
[10:04:18] n00bDev: whats the workaroun for this?
[10:04:58] kitsuneyo: rvanlieshout, like i said i'm just thinking about different possibilities... in this case you convinced me i don't need that ;)
[10:05:17] kitsuneyo: i'll use columns
[10:05:17] rvanlieshout: and you should always rethink if you need something what isn't default behaviour
[10:05:24] Jasaka: has joined #RubyOnRails
[10:05:41] kitsuneyo: yeah i guess
[10:05:59] yardenbar: has joined #RubyOnRails
[10:05:59] rvanlieshout: it could be ok, but in most cases what you're trying to do would fit in the default
[10:06:18] ferr: has joined #RubyOnRails
[10:06:41] baweaver: has joined #RubyOnRails
[10:07:06] nettoweb: guys, Everytime I restart my droplet my website get down... and in logs I see this message: *4 connect() to unix:/home/deployer/apps/.../shared/tmp/file.sock failed (111: Connection refused) while connecting to upstream
[10:07:41] nettoweb: is there some service that is not started automatically, I checked Nginx and Unicorn and I can see in the list using ps -aux | grep nginx
[10:09:23] rvanlieshout: nettoweb: they could be started in the wrong order
[10:10:16] nettoweb: is there a way to check if that's the cause?
[10:10:18] nettoweb: rvanlieshout
[10:10:34] jottr_: has joined #RubyOnRails
[10:10:35] rrawlins: If foo has_one (optional) bar is there any way to have AR throw RecordNotFound if I call foo.bar and a bar isn't present? A bit like find(x) would on a has_many?
[10:11:15] nettoweb: rvanlieshout Im following this guide ( https://gist.github.com/ChuckJHardy/f44dda5f94c6bbdba9a4 ) and I've noticed this behavior in an previoes app I deployed following these instructions as well
[10:11:24] rvanlieshout: nettoweb: the output of the boot process?
[10:11:27] mikecmpbll: has joined #RubyOnRails
[10:11:39] rodfersou: has joined #RubyOnRails
[10:11:46] rvanlieshout: rrawlins: def bar ; foo || fail RecordNotFound ; end
[10:12:51] rrawlins: rvanlieshout: thanks, that's pretty much what I was considering, just wasnt sure if there was something out of the box. Appreciate the help!
[10:13:18] nettoweb: rvanlieshout I've never done this before. Im using DO so just do it by UI.
[10:13:23] rrawlins: rvanlieshout: might implement it as def bar! so as not to upset initial implementation.
[10:13:33] rvanlieshout: rrawlins: even better
[10:13:44] rvanlieshout: nettoweb: never used DO so don't know where to look there
[10:13:45] Palsson: has joined #RubyOnRails
[10:14:06] antgel: has joined #RubyOnRails
[10:14:43] jahbrewski: has joined #RubyOnRails
[10:18:19] tetraktys: has joined #RubyOnRails
[10:19:28] ravster: has joined #RubyOnRails
[10:20:57] rrawlins: rvanlieshout: need a little tweaking but ended up with... def theme!; theme || (raise ActiveRecord::RecordNotFound); end
[10:22:13] lexileo: has joined #RubyOnRails
[10:22:53] yoongkang: has joined #RubyOnRails
[10:24:14] sleungcy: has joined #RubyOnRails
[10:26:12] rvanlieshout: rrawlins: awesome
[10:27:38] ldnunes: has joined #RubyOnRails
[10:29:46] AlexJakeGreen: has joined #RubyOnRails
[10:30:26] Cohedrin: has joined #RubyOnRails
[10:30:55] emachnic: has joined #RubyOnRails
[10:31:45] w0rd-driven: has joined #RubyOnRails
[10:33:27] agit0: has joined #RubyOnRails
[10:34:33] PlasmaStar: has joined #RubyOnRails
[10:34:39] techsethi: has joined #RubyOnRails
[10:36:49] mhoungbo: has joined #RubyOnRails
[10:36:56] Moeh: has joined #RubyOnRails
[10:39:40] workmad3: has joined #RubyOnRails
[10:41:05] FooMunki: has joined #RubyOnRails
[10:41:59] Pumukel: has joined #RubyOnRails
[10:43:15] antgel: has joined #RubyOnRails
[10:43:22] Ergo: has joined #RubyOnRails
[10:43:39] blackmesa: has joined #RubyOnRails
[10:44:37] hamed_r: has joined #RubyOnRails
[10:44:45] jahbrewski: has joined #RubyOnRails
[10:45:52] nettoweb: has joined #RubyOnRails
[10:46:32] agit0: has joined #RubyOnRails
[10:47:30] Ropeney: has joined #RubyOnRails
[10:47:59] Grundell: has joined #RubyOnRails
[10:48:12] arup_r: has joined #RubyOnRails
[10:51:45] JonasRothmann: has joined #RubyOnRails
[10:52:07] JonasRothmann: @tbuehlmann Are you here?
[10:52:40] GeorgesLeYeti: I have problem but I don't really know how to express it well
[10:52:54] GeorgesLeYeti: so I made a gist :)
[10:52:55] GeorgesLeYeti: https://gist.github.com/GeorgesLeYeti/0e690951852e7bc34a5e
[10:53:19] dionysus69: has joined #RubyOnRails
[10:54:20] JonasRothmann: Anyone know how this doesnt work
[10:54:21] JonasRothmann: resources :posts, only: [:index], :path => '/' do get '/sort/:id', on: :collection end
[10:54:31] JonasRothmann: Not in one line ofc
[10:54:37] arup_r: jonasrothmann: What do you mean by doesn't work ?
[10:54:53] rvanlieshout: jonasrothmann: and get '/sort/:id' as collection on post is really really a weird route
[10:55:03] arup_r: GeorgesLeYeti: What us the issue ?
[10:55:32] JonasRothmann: How do I do that. I just got told to use :collection so I didn't run into the problem of using /:id/sort to get to posts#sort
[10:55:41] arup_r: yes, it should be either member or collection as per the current example
[10:55:46] GeorgesLeYeti: Actually I want to find the closest value of and integer to a step a 40 (=1000/25)
[10:56:23] GeorgesLeYeti: arup_r, I want to find the value in time of each frame.
[10:57:01] nettoweb: rvanlieshout I checked ps -aux after deploying and after restarting the VM, and I've found out that unicorn i not starting on boot. So that's the cause, Im justing looking for a script to start it on boot
[10:57:23] JonasRothmann: How would I do that then? rvanlieshout https://gist.github.com/jonasrh/ea33be9996158cb7da31
[10:57:28] GeorgesLeYeti: what i've made works. But want to know if there is any other way (smarter) :)
[10:59:12] agit0: has joined #RubyOnRails
[10:59:38] yoongkang: has joined #RubyOnRails
[10:59:39] rvanlieshout: jonasrothmann: what is 'sort' and why does it include an id?
[10:59:50] JonasRothmann: Its the id for the type
[11:00:06] JonasRothmann: Like alphabetical, author, created date
[11:00:13] arup_r: GeorgesLeYeti: dunno. I need to know more to answer you. Mostly how you reached to the formula .. like etc
[11:00:22] rvanlieshout: get :sort, on: :collection
[11:00:29] JonasRothmann: Thx 4 the help btw. I am quite new with rails
[11:00:36] rvanlieshout: ah in that case
[11:00:42] rvanlieshout: what sould the sort url do?
[11:01:46] Yeomra: has joined #RubyOnRails
[11:02:00] JonasRothmann: /sort/ is basically just a filter for what type of sorting it should use.
[11:02:24] rvanlieshout: that should just be a param in index
[11:03:43] JonasRothmann: I mean the url should be /sort/1
[11:03:49] OSIRIS: has joined #RubyOnRails
[11:04:05] rvanlieshout: then it's not a resource
[11:04:11] rvanlieshout: you either use restfull routes or not
[11:04:15] rvanlieshout: (which you should)
[11:04:25] PedramT: has joined #RubyOnRails
[11:04:32] rvanlieshout: /sort/1 would be SortController#show for id 1
[11:04:33] JonasRothmann: I do use restful, but what if i need to extend from that?
[11:04:35] Cohedrin: has joined #RubyOnRails
[11:04:36] tbuehlmann: sorry for not going more into detail, I agree with rvanlieshout. I like that being part of the index route
[11:04:38] rvanlieshout: resources :sort
[11:05:13] tbuehlmann: as in, /posts?sort=foo
[11:05:15] JonasRothmann: if i do resources sort it works like this though /:id(of post)/sort
[11:05:32] rvanlieshout: jonasrothmann: then it's not resources :post
[11:05:45] JonasRothmann: Did u check my gist?
[11:05:48] rvanlieshout: if you want to sort the index action of posts, just add it in a way tbuehlmann wrote
[11:06:02] moeabdol3: has joined #RubyOnRails
[11:07:00] rvanlieshout: jonasrothmann: normal resources don't have a 'sort' action
[11:07:04] rvanlieshout: they have an index action
[11:07:10] rvanlieshout: presenting the list (of posts in this case)
[11:07:13] tbuehlmann: btw, I wrote a little thingy to make your usecase a little less painful. will provide an example if you've finished learning your lesson :)
[11:07:25] JonasRothmann: Yeah index does display a list of posts
[11:07:30] rvanlieshout: if you want to have the list action return that list sorted, supply a param
[11:07:33] rvanlieshout: like ?sort=foo
[11:07:35] JonasRothmann: So how would I go around making sort. How would u?
[11:07:50] rvanlieshout: posts_path(sort: 'foo')
[11:08:00] rvanlieshout: no need to add anything in your routes
[11:08:02] rvanlieshout: cause the action is still index
[11:09:04] JonasRothmann: So its a get param in index, right?
[11:09:11] rvanlieshout: a params[:sort]
[11:09:18] rvanlieshout: the way it's passed is irrelevant at that time
[11:09:26] rvanlieshout: it could be a querystring, post, json, xml, whatever
[11:09:30] rvanlieshout: in that context it's just a param
[11:10:24] JonasRothmann: ok. But just to make sure I am correct. post params are sent through http headers while get params are sent through url right?
[11:11:00] rvanlieshout: almost. post params are sent through http body
[11:11:11] User458764: has joined #RubyOnRails
[11:11:22] rvanlieshout: but the nice thing here is that when handling an action
[11:11:28] rvanlieshout: the way the params are passed is irrelevant
[11:11:36] lexiMon: has joined #RubyOnRails
[11:11:58] sankaber: has joined #RubyOnRails
[11:12:02] JonasRothmann: Yeah ofc. But sort would obviously be sent through get for easier link sharing.
[11:12:21] rvanlieshout: and it's because of what a post request should do
[11:12:26] rvanlieshout: according to the specs
[11:12:33] DEA7TH: has joined #RubyOnRails
[11:13:30] bronson: has joined #RubyOnRails
[11:13:31] sankaber: has joined #RubyOnRails
[11:14:22] rvanlieshout: lunch time. bbl
[11:14:45] jahbrewski: has joined #RubyOnRails
[11:15:42] tbuehlmann: jonasrothmann, so, I wrote a library called lappen, which helps when applying various filters to a model (like sorting, filtering, paginating, ...)
[11:16:09] tbuehlmann: steps to go with that: https://gist.github.com/tbuehlmann/085e68d4eb9cc700620c
[11:16:20] tbuehlmann: (not tested, written down by heart)
[11:16:21] rvanlieshout: it's not on github?
[11:16:23] JonasRothmann: New to rails though, so I'd rather just write as much code myself without compromising safety
[11:16:34] rvanlieshout: ah. there it is
[11:16:38] rvanlieshout: let me look at that one after lunch
[11:16:57] tbuehlmann: it's on github: https://github.com/tbuehlmann/lappen
[11:17:16] tbuehlmann: jonasrothmann, right, that's why I wrote that I'll present it after you learned your lesson
[11:17:41] tbuehlmann: that sounds a bit negative, wasn't meant to :)
[11:18:25] kristofferR: has joined #RubyOnRails
[11:19:43] moeabdol3: has joined #RubyOnRails
[11:20:16] n00bDev: has joined #RubyOnRails
[11:20:52] AimlessRAven: has joined #RubyOnRails
[11:21:31] AimlessRAven: how to show f.input :password only in create action not in edit
[11:22:24] lexileo: has joined #RubyOnRails
[11:22:32] wopi: has joined #RubyOnRails
[11:23:03] wopi: Hi, how I can prevent SQL injection here: MyModel.destroy(params[:id]) ?
[11:24:09] tbuehlmann: AimlessRaven, check if the record is a new record with `if @your_object.new_record?` (or the opposite: `if @your_object.persisted?`)
[11:27:29] Cervajz_: has joined #RubyOnRails
[11:29:29] pydave6367: has left #RubyOnRails: ()
[11:29:45] jahbrewski: has joined #RubyOnRails
[11:30:07] deur-: tbuehlmann: maybe a low-fi solution, but would a simple params[:id].to_i not suffice?
[11:30:15] deur-: as strings get cast to 0 anyway
[11:30:33] tetraktys: has joined #RubyOnRails
[11:32:47] deur-: I know, but you replied :) I was just wondering if my suggestion was reasonable, or rather something to be frowned upon
[11:33:47] deur-: and you replied to another question
[11:33:51] deur-: I'll crawl back to my cave now
[11:34:45] codehotter: I can get my rails app to crash by sending ~300k requests to /doesnt_exist (404)
[11:34:53] codehotter: It crashes due to out of memory
[11:34:59] codehotter: how can I troubleshoot this?
[11:35:16] codehotter: Initially I figured I was leaking memory somewhere, but this doesn't even execute a controller... ?
[11:35:20] codehotter: It's a route that doesn't exist
[11:35:37] deur-: wopi: what I said above: I usually do params[:id].to_i because nil and strings get cast to 0 anyway
[11:35:47] zarubin: has joined #RubyOnRails
[11:36:41] moeabdol3: has joined #RubyOnRails
[11:37:51] deur-: wopi: Alternatively you could isolate params[:id] and sanitize it in a separate method (check for record existance etc). I find that to be overkill in most cases though
[11:38:19] deur-: *existence
[11:38:33] roshanavand: has joined #RubyOnRails
[11:39:37] PedramT: has joined #RubyOnRails
[11:41:49] askhat: has joined #RubyOnRails
[11:46:41] User458764: has joined #RubyOnRails
[11:47:06] Spami: has joined #RubyOnRails
[11:48:54] EdwardIII: hmm ok am i just totally misunderstanding modules in ruby? https://gist.github.com/EdwardIII/5a29b60f638c8bc9ccc1
[11:50:38] rgtk: has joined #RubyOnRails
[11:51:14] tvw: has joined #RubyOnRails
[11:51:24] EdwardIII: everything is inside app/ so i'm just expecting the whole lot to be dumped into the test's scope
[11:52:36] askhat: has left #RubyOnRails: ()
[11:52:39] EdwardIII: ah, i think it's because i have the wrong file structure maybe, hmm
[11:52:50] askhat: has joined #RubyOnRails
[11:54:25] EdwardIII: yes, that's it, sorry for the noise
[11:54:25] ElFerna_: has joined #RubyOnRails
[11:54:37] brendan-: has joined #RubyOnRails
[11:55:26] rvanlieshout: ::Api::Client.new
[11:56:48] sandstrom: has joined #RubyOnRails
[12:01:08] c355E3B: has joined #RubyOnRails
[12:01:17] roshanavand: has joined #RubyOnRails
[12:06:54] rails690: has joined #RubyOnRails
[12:07:01] jottr_: has joined #RubyOnRails
[12:08:22] baweaver: has joined #RubyOnRails
[12:08:55] rails690: I want to use activerecord-import for bulk creating records because its very fast, but i need to use callbacks on the object because of search index updating (elasticsearch) and versioning (papertrail). What should I do? Should I create all the objects without callbacks, then manually (inside a job or something) call the callbacks on the list of people created?
[12:10:46] brendan-: has joined #RubyOnRails
[12:11:03] tbuehlmann: rails690, often times it's enough to simply put the creations in a transaction
[12:11:27] rails690: tbuehlmann: could you elaborate on that more, im not familiar with transactions
[12:12:08] rvanlieshout: rails690: bulk import + callback is a no go
[12:12:18] rails690: rvanlieshout: what do u suggest?
[12:12:35] rvanlieshout: normal insert
[12:12:40] rvanlieshout: but without the user having to wait for it
[12:12:46] rails690: so normal insert in a job?
[12:13:00] rails690: and progress bar?
[12:13:33] rvanlieshout: do you want them to stare at the screen until finished?
[12:13:55] rails690: not sure, maybe, if they're importing 1000 records
[12:14:08] rails690: im not sure if it should be in the background or if they should look at a progress bar
[12:14:27] rvanlieshout: do they have to wait for it?
[12:14:37] rvanlieshout: or can they just be prompted that the import will run and have a nice day
[12:14:43] rails690: ideally a background progress bar is the coolest
[12:14:46] jahbrewski: has joined #RubyOnRails
[12:14:53] rvanlieshout: i know it's cool
[12:14:57] rvanlieshout: but would users care?
[12:15:10] rails690: yeah cuz maybe they want to do something with the imported records right away
[12:15:19] rails690: and its not done importing
[12:15:28] rails690: they need to be aware of the progress
[12:15:32] rvanlieshout: all imported records are available already
[12:15:36] rvanlieshout: but ok. then add a progress bar
[12:15:46] rvanlieshout: create a import task model ish. store progress in there
[12:16:14] rails690: what do u think of using the delayed_job + progress_bar gems?
[12:16:31] rails690: or should i go more towards resque and my own progress bar implementation?
[12:16:47] tbuehlmann: rails690: https://gist.github.com/tbuehlmann/625ae4fc74a7b3096697
[12:16:52] tbuehlmann: but that's not the answer to your question
[12:16:58] rvanlieshout: rails690: i personally like sidekiq
[12:17:06] rvanlieshout: and progress bar is just bootstrap progress?
[12:17:14] Ropeney: has joined #RubyOnRails
[12:17:42] rails690: i remember reading a downside to sidekiq i think it was multi-threading or something
[12:17:56] rvanlieshout: that's a pro :)
[12:18:09] PedramT: has joined #RubyOnRails
[12:18:33] rails690: wow transactions are much faster and they do the same thing, why?
[12:19:23] emachnic: has joined #RubyOnRails
[12:19:27] blackmesa: has joined #RubyOnRails
[12:19:31] rvanlieshout: because it can execute it in a closed context
[12:20:26] adre: has joined #RubyOnRails
[12:20:28] ravster: has joined #RubyOnRails
[12:20:59] n00bDev: has joined #RubyOnRails
[12:23:14] neshmi_: has joined #RubyOnRails
[12:23:50] zpe: has joined #RubyOnRails
[12:24:26] ferr: has joined #RubyOnRails
[12:25:43] sleungcy: has joined #RubyOnRails
[12:26:41] Zadrel: has joined #RubyOnRails
[12:27:20] krz: has joined #RubyOnRails
[12:28:13] brendan-: has joined #RubyOnRails
[12:28:17] rails690: it seems like i never should use activerecord-import then... since i will always need callbacks on created objects
[12:28:35] rails690: so whats the point of activerecord-import?? Objects that dont have callbacks?
[12:29:46] jahbrewski: has joined #RubyOnRails
[12:30:17] Sylario_: has joined #RubyOnRails
[12:30:51] codedmart: has joined #RubyOnRails
[12:31:00] jottr: has joined #RubyOnRails
[12:32:14] yarden_: has joined #RubyOnRails
[12:32:18] Cervajz__: has joined #RubyOnRails
[12:33:40] Eswar1: has joined #RubyOnRails
[12:33:52] mostlybadfly_: has joined #RubyOnRails
[12:34:54] EdwardIII: rvanlieshout: i'm a bit scared of multithreading
[12:35:13] akshat: has joined #RubyOnRails
[12:35:30] EdwardIII: rvanlieshout: because i'm not sure how to evaluate whether the libs i'm using are thread safe
[12:35:52] EdwardIII: ACTION python scaredy cat
[12:36:22] EdwardIII: what's the most simple way to run 3 things concurrently-ish then run a callback when they have all finished?
[12:37:06] Ropeney: has joined #RubyOnRails
[12:37:19] matthewd: EdwardIII: https://github.com/ruby-concurrency/concurrent-ruby
[12:38:14] matthewd: EdwardIII: Specifically probably https://ruby-concurrency.github.io/concurrent-ruby/Concurrent.html#dataflow-class_method
[12:38:54] EdwardIII: i looked at celluloid and it looked awesome, but also kinda complex
[12:39:04] lyoshajapan: has joined #RubyOnRails
[12:39:15] rails690: if the libs ur using arent thread safe, what happens?
[12:39:37] lipoqil: has joined #RubyOnRails
[12:40:05] benhuda: has joined #RubyOnRails
[12:40:21] EdwardIII: i'm more used to celery where you can just chuck anything at it and it sort of just works
[12:40:42] EdwardIII: ACTION reads the concurrent ruby info
[12:42:12] jkamenik: has joined #RubyOnRails
[12:42:31] rrawlins: has joined #RubyOnRails
[12:43:53] brendan-: has joined #RubyOnRails
[12:44:44] jahbrewski: has joined #RubyOnRails
[12:45:29] EdwardIII: matthewd: concurrent-ruby seems kind of similar to celluloid? or i'm misunderstanding?
[12:46:10] rashmirathi: has joined #RubyOnRails
[12:46:20] Yeomra: has joined #RubyOnRails
[12:47:13] matthewd: Futures are futures, so.. probably?
[12:50:19] blackmesa: has joined #RubyOnRails
[12:50:58] JonasRothmann: has joined #RubyOnRails
[12:52:24] jottr: has joined #RubyOnRails
[12:54:07] JonasRothmann: Uhm, can anyone help me. The sort always provides an error if u try the 3rd parameter, even if you switch em around https://gist.github.com/jonasrh/7dc7d89e9639192224c4
[12:54:32] ElFerna_: has joined #RubyOnRails
[12:55:18] rvanlieshout: jonasrothmann: ?
[12:56:05] rvanlieshout: and you might want to join user and sort by it's name
[12:56:41] JonasRothmann: undefined method `+' for nil:NilClass
[12:57:02] JonasRothmann: I will rvan right now I am getting basicly just trying to make it work
[12:57:37] rvanlieshout: that's because your get_sort returns nil
[12:57:42] rvanlieshout: lemme refactor that
[12:57:57] JonasRothmann: YEah, but is it bcus it cant be put through multiple elseifs?
[12:58:09] JonasRothmann: I get why I get the error, but Idk how/why it would occour
[12:59:24] rvanlieshout: because get_sort returns nil
[12:59:32] rvanlieshout: why wouldn't it? what param[:sort] is provided?
[13:01:55] PedramT: has joined #RubyOnRails
[13:02:34] jonasrothmann_: has joined #RubyOnRails
[13:02:43] deur-: jonasrothmann: mind you that "if params[:sort]" will return true if its value is an empty string
[13:02:59] ElFerna_: has joined #RubyOnRails
[13:03:25] rvanlieshout: did you see the comment to that gist?
[13:03:38] mooru: has joined #RubyOnRails
[13:04:11] hobodave: has joined #RubyOnRails
[13:04:35] jonasrothmann_: Even if i replace params[:sort] with "alphabetical", which makes the last 1 trigger 100%, it gives the same error
[13:04:42] Pupeno: has joined #RubyOnRails
[13:04:53] rvanlieshout: jonasrothmann_: gist the rror
[13:05:44] theod: has joined #RubyOnRails
[13:06:34] jonasrothmann_: https://gist.github.com/jonasrh/054376b2598ef737b4f5
[13:06:36] jacksparrow007: has joined #RubyOnRails
[13:07:16] Sylario: Is there a way in a rspec test, to know what exactly a controller test is calling when doing get :index ?
[13:07:18] rvanlieshout: jonasrothmann_: gist the full trace, the new controller code and the request log
[13:08:15] jonasrothmann_: session or env dump?
[13:08:54] moeabdol: has joined #RubyOnRails
[13:10:06] blackmesa: has joined #RubyOnRails
[13:11:49] arup_r: sylario: it is hitting your respective controller action. You test yours, why the internal ? ( i'm curious )
[13:12:01] DEA7TH: has joined #RubyOnRails
[13:12:13] Sylario: what do you mean by the internal?
[13:12:55] Sylario: arup_r: i have a failling test, but the route exist and it seems to works, so i am trying to understand why the rspec test fails
[13:13:23] arup_r: sylario: show your test code and failing output ?
[13:13:33] Moeh: has joined #RubyOnRails
[13:14:26] PedramT: has joined #RubyOnRails
[13:14:44] jahbrewski: has joined #RubyOnRails
[13:15:07] morfin: has joined #RubyOnRails
[13:15:09] Ergo: has joined #RubyOnRails
[13:15:26] Sylario: arup_r: https://gist.github.com/bsylvain/cc1667c09917556a235f
[13:15:28] jonasrothmann_: https://gist.github.com/jonasrh/c78a9714ed13ee0da6fc
[13:15:36] jonasrothmann_: Sry in school right now
[13:15:43] jonasrothmann_: Thats my controller
[13:15:49] Sylario: of course the URL works fine
[13:16:11] techsethi: has joined #RubyOnRails
[13:16:21] arup_r: sylario: add the failuer message also pls
[13:16:40] arup_r: that whole big red ++/-- shit I meant
[13:17:06] arBmind: has joined #RubyOnRails
[13:17:44] rvanlieshout: jonasrothmann_: you didn't use the gist comment
[13:17:53] rvanlieshout: and still no request log
[13:18:19] ddv: arup_r: watch your language
[13:18:21] mooru: has joined #RubyOnRails
[13:18:24] rvanlieshout: also raise get_sort.inspect on the first line of you controller
[13:18:59] kerunaru: has joined #RubyOnRails
[13:19:55] arup_r: sylario: do one thing, tail -f log/test.log and in another terminal run the test and show the log in the gist again ?
[13:20:34] jonasrothmann_: Oh sry I will check now.
[13:20:35] arup_r: what I am trying to see is not available rspec error output log.. And please give the whole output, don't chop out anything
[13:20:58] jonasrothmann_: Request log as in browser HTTP request? Or on server
[13:21:47] n00bDev: has joined #RubyOnRails
[13:22:23] Sylario: arup_r: i know what it is, my multitenancy code. I do not know why it makes it fails now but it seems to
[13:22:53] Sylario: arup_r: thx for the tail i did not though about that
[13:23:13] arup_r: sylario: cool. I learned it from rvanlieshout :)
[13:23:17] jonasrothmann_: Aight the gist worked
[13:23:34] sevenseacat: has joined #RubyOnRails
[13:23:50] jonasrothmann_: Why is there no DESC in title? Bcus it's default?
[13:24:03] rvanlieshout: because you had it in your prevous one?
[13:25:14] jonasrothmann_: I mean why collection.order('title') and not collection.order('title DESC')
[13:25:23] rvanlieshout: oh. just forgot to add it
[13:25:54] jonasrothmann_: But default is desc
[13:26:09] rvanlieshout: that depends on your db
[13:26:55] sleungcy: has joined #RubyOnRails
[13:27:55] gavinhughes: has joined #RubyOnRails
[13:28:13] crazyphil: has left #RubyOnRails: ()
[13:28:14] ziyadb: has joined #RubyOnRails
[13:29:45] jahbrewski: has joined #RubyOnRails
[13:34:12] arup_r: has left #RubyOnRails: ()
[13:35:39] sonOfRa: has joined #RubyOnRails
[13:36:27] PedramT: has joined #RubyOnRails
[13:37:19] croc: has joined #RubyOnRails
[13:39:15] croc: has joined #RubyOnRails
[13:39:17] IrishGringo: has joined #RubyOnRails
[13:40:39] earfin: has joined #RubyOnRails
[13:41:38] worknick: has joined #RubyOnRails
[13:42:12] worknick: i am using jq ajax to send data to create action. the params are not sent as params of model. how can i make them params of that model?
[13:42:27] EdwardIII: hrm is it satanic to say self.new(params)?
[13:43:31] EdwardIII: like this? https://gist.github.com/EdwardIII/9e276ff0a56854037397#file-r-rb-L20
[13:43:36] EdwardIII: i should probably be asking in #ruby
[13:44:25] arup_r: has joined #RubyOnRails
[13:47:48] agit0: has joined #RubyOnRails
[13:48:42] aegis3121: has joined #RubyOnRails
[13:50:20] Rodya_: has joined #RubyOnRails
[13:51:03] tbuehlmann: EdwardIII, that's okay
[13:51:20] tbuehlmann: but you don't want to return there
[13:51:29] tbuehlmann: (this is not javascript)
[13:51:44] EdwardIII: heh yeah that was messing it up (i did goto #ruby in the end)
[13:51:49] blt: has joined #RubyOnRails
[13:53:03] k13nox: has joined #RubyOnRails
[13:57:45] PedramT: has joined #RubyOnRails
[13:57:46] JonasRothmann: has joined #RubyOnRails
[13:57:54] treehug88: has joined #RubyOnRails
[13:58:49] eugenekgn_: has joined #RubyOnRails
[13:59:44] jahbrewski: has joined #RubyOnRails
[14:02:49] eugenekgn: has joined #RubyOnRails
[14:02:52] arup_r: has joined #RubyOnRails
[14:04:15] Rodya_: has joined #RubyOnRails
[14:07:50] eugenekgn: Hi there, I am new to Ruby world as I've been .Net developer for about 6 years and after looking at my teams code base I am really questioning what is claimed to be "the best ruby practices" i.e I am not sure how a I feel about place queries in a controller given that's part of business logic which should be hidden in (service or model), why are models so FAT (This is clear violation of (S) in SOLID -- is there a noition of PLAIN OLD RUBY OBJECT?
[14:07:50] eugenekgn: Should there really be logic in Rabl files -- why not just have ViewModel that sends back the data with prescribe schema?
[14:09:17] PedramT: has joined #RubyOnRails
[14:09:52] hamed_r: has joined #RubyOnRails
[14:10:03] baweaver: has joined #RubyOnRails
[14:10:37] jonasrothmann_: has joined #RubyOnRails
[14:11:09] tbuehlmann: I wouldn't construct too complex model queries in a controller either. having that logic in a service or the model sounds good to me. beside SOLID, active record doesn't really follow the SRP that much
[14:11:32] blt: eugenekgn: lol. rails is a ghetto
[14:11:47] drbayer: has joined #RubyOnRails
[14:12:12] morfin: i started learing rails for some reasons they loks pretty nice
[14:12:55] Bloomer: has joined #RubyOnRails
[14:13:38] dexter_e: has joined #RubyOnRails
[14:17:24] tetraktys: has joined #RubyOnRails
[14:18:32] worknick: has joined #RubyOnRails
[14:18:36] sevenseacat: blt: let's not throw around phrases like that.
[14:19:46] gavinhughes: has left #RubyOnRails: ()
[14:19:47] arup_r: worknick: shoot :)
[14:20:04] worknick: is there any doc on using ajax for create ation when not using form_form!
[14:20:09] deur-: eugenekgn: a good way to clean up models is to use concerns and value objects
[14:20:19] worknick: arup_r: lol! i rephrased it many times. due to this channel rules!
[14:20:24] worknick: hence the delay....
[14:20:49] deur-: eugenekgn: and staying away from model callbacks; those belong in your service classes
[14:20:53] ravster: has joined #RubyOnRails
[14:20:53] arup_r: worknick: read button_to
[14:21:30] ravster: has left #RubyOnRails: ()
[14:21:44] worknick: arup_r: no. i want to do it from jquery. because after click i want to change my "follow" button value, url etc to "Unfollow" value and url along with passingt extra data received from previuws "Follow" call
[14:21:56] eugenekgn: is there any literature on services classes with ruby?
[14:22:01] ravster: has joined #RubyOnRails
[14:22:19] eugenekgn: @deur- is there a concept of plain old objects that don't have any data?
[14:22:26] arup_r: worknick: still possible.. catch the event and then do the ajax call
[14:22:42] worknick: let me check.
[14:23:53] n00bDev: has joined #RubyOnRails
[14:24:01] arup_r: worknick: http://api.jquery.com/jquery.ajax/ read this..
[14:24:07] roshanavand: has joined #RubyOnRails
[14:24:35] sevenseacat: worknick: http://guides.rubyonrails.org/working_with_javascript_in_rails.html#form-for
[14:25:06] worknick: sevenseacat: thanks. checking.
[14:25:17] sevenseacat: always check the guides first.
[14:25:23] deur-: eugenekgn: http://blog.steveklabnik.com/posts/2011-09-06-the-secret-to-rails-oo-design might be worth reading
[14:25:34] deur-: eugenekgn: its followup is linked at the top
[14:25:44] eugenekgn: cool thanks
[14:26:22] VeryBewitching: has joined #RubyOnRails
[14:26:42] VeryBewitching: Good morning folks.
[14:27:11] deur-: afaik after 3 years in rails, there's never an absolute, correct way to do anything
[14:27:26] deur-: much like the pirate code in pirates o/t carribean, there are only guidelines
[14:27:35] treaki_: has joined #RubyOnRails
[14:27:41] atomical: has joined #RubyOnRails
[14:27:47] sevenseacat: deur-: sometimes thats the case. other times, things are clearly wrong.
[14:27:59] VeryBewitching: Lots of convention, none of which you are held to.
[14:28:19] bmalum: has joined #RubyOnRails
[14:29:42] jahbrewski: has joined #RubyOnRails
[14:30:05] sevenseacat: however, things will get very painful if you stray too far from them.
[14:30:05] ddv: Rails is omakase.
[14:30:13] sevenseacat: i hate that phrase.
[14:30:21] sevenseacat: its so stupid.
[14:30:52] PedramT: has joined #RubyOnRails
[14:30:53] victortyau: has joined #RubyOnRails
[14:31:45] VeryBewitching: sevenseacat: I would suggest that it's most painful for people who are not you :D
[14:31:51] centrx: has joined #RubyOnRails
[14:31:53] zpe: has joined #RubyOnRails
[14:32:09] VeryBewitching: Following Rails conventions allows a team to play together nicely.
[14:32:15] sevenseacat: oh it gets painful even for me, I'm no-one special.
[14:32:53] sevenseacat: I've also seen teams do some crazy things
[14:32:53] VeryBewitching: I'm liking the Rails + Trailblazer combination for keeping everything divided well.
[14:33:06] sevenseacat: I can't get into trailblazer
[14:33:20] chipotle: has joined #RubyOnRails
[14:33:32] PedramT: has joined #RubyOnRails
[14:34:12] VeryBewitching: At first I thought it was too segmented, but the more I play with it, the more it simplified my approaches to individual work units.
[14:34:22] sevenseacat: its been a while since i looked at it though (maybe a year and a bit?) so maybe it's improved
[14:35:21] VeryBewitching: I like that an operation is portable.
[14:35:33] VeryBewitching: And that I can test one on its own.
[14:35:48] yos7ph: has joined #RubyOnRails
[14:35:52] deur-: i've only really used the cells/view models stuff
[14:35:55] emachnic: has joined #RubyOnRails
[14:35:59] deur-: and we sort of use a variant of the operations in trailblazer
[14:37:06] emachnic: has joined #RubyOnRails
[14:37:21] Eswar: has joined #RubyOnRails
[14:37:43] deur-: the cells are nice though, keeps projects with a lot of frontend organized better
[14:38:36] JohnBat26: has joined #RubyOnRails
[14:39:31] VeryBewitching: The past few weeks, unfortunately, I've been working with Laravel.
[14:39:49] sevenseacat: i've heard good things about laravel. well, as good as you can get in php-land.
[14:40:12] snowy: has joined #RubyOnRails
[14:40:44] B1n4r10: has joined #RubyOnRails
[14:41:16] artto: has joined #RubyOnRails
[14:41:51] blt: has left #RubyOnRails: ("WeeChat 1.3")
[14:43:14] safetypin: has joined #RubyOnRails
[14:44:11] ql6wlld: has joined #RubyOnRails
[14:44:45] jahbrewski: has joined #RubyOnRails
[14:44:59] ramortegui: has joined #RubyOnRails
[14:45:33] ql6wlld: has joined #RubyOnRails
[14:46:28] Snowy_: has joined #RubyOnRails
[14:46:46] symbol: has joined #RubyOnRails
[14:50:01] Cervajz: has joined #RubyOnRails
[14:51:02] PedramT: has joined #RubyOnRails
[14:51:27] stannard: has joined #RubyOnRails
[14:53:53] kerunaru: has joined #RubyOnRails
[14:55:58] sankaber: has joined #RubyOnRails
[14:57:33] Cervajz: has joined #RubyOnRails
[14:57:58] Cervajz_: has joined #RubyOnRails
[14:58:56] sankaber: has joined #RubyOnRails
[14:59:08] arup_r: has left #RubyOnRails: ()
[14:59:16] moeabdol: has joined #RubyOnRails
[14:59:20] polishdub: has joined #RubyOnRails
[14:59:40] PedramT: has joined #RubyOnRails
[15:00:05] jahbrewski: has joined #RubyOnRails
[15:00:26] meves: has joined #RubyOnRails
[15:00:39] morfin: well, rails looks way better than all stuff i saw in PHP
[15:01:26] Sadin: has joined #RubyOnRails
[15:01:44] darkxploit: has joined #RubyOnRails
[15:02:43] barhum2013: has joined #RubyOnRails
[15:03:36] aaronmoodie: has joined #RubyOnRails
[15:05:40] morfin: i did not try Laravel yet(but i saw Symfony 2, Yii 1.1/2, Zend, Kohana, Phalcon) and there was no such flexibility as rails have
[15:08:05] jacksparrow007: has joined #RubyOnRails
[15:08:21] deur-: morfin: laravel, afaik, did take inspiration from rails
[15:08:41] deur-: as far as php frameworks go, i'd say you're best off with that one
[15:09:11] deur-: i'm partial to symfony, but you'll write cleaner code by far with laravel imo
[15:09:24] arup_r: has joined #RubyOnRails
[15:09:56] adavia: has joined #RubyOnRails
[15:12:02] lacrymology: has joined #RubyOnRails
[15:15:23] sandstrom: has joined #RubyOnRails
[15:15:39] jottr: has joined #RubyOnRails
[15:21:01] The_Phoenix: has joined #RubyOnRails
[15:21:30] atomical: has joined #RubyOnRails
[15:22:17] jtong: has joined #RubyOnRails
[15:22:21] dopamean_: has joined #RubyOnRails
[15:22:30] morfin: i know about laravel but i do not beleive it can do same things as rails can since rails are a bit more..advanced because ruby have some nice features
[15:23:22] PedramT: has joined #RubyOnRails
[15:23:44] morfin: Symfony is pretty nice(but i used Doctrine as ORM) i learned it a bit
[15:24:37] n00bDev: has joined #RubyOnRails
[15:25:30] ryanRT: has joined #RubyOnRails
[15:25:38] blackmesa: has joined #RubyOnRails
[15:26:18] momomomomo: has joined #RubyOnRails
[15:26:47] jgpawletko: has joined #RubyOnRails
[15:29:16] sleungcy: has joined #RubyOnRails
[15:29:39] tego101: has joined #RubyOnRails
[15:29:40] jahbrewski: has joined #RubyOnRails
[15:29:47] User458764: has joined #RubyOnRails
[15:30:42] kies^: has joined #RubyOnRails
[15:33:52] coderMe: has joined #RubyOnRails
[15:34:18] mary5030: has joined #RubyOnRails
[15:34:57] mary5030: has joined #RubyOnRails
[15:35:37] meves: has joined #RubyOnRails
[15:36:16] mary5030: has joined #RubyOnRails
[15:36:38] Bloomer: has joined #RubyOnRails
[15:38:12] shinnya: has joined #RubyOnRails
[15:38:39] skroon: has joined #RubyOnRails
[15:39:37] ankhers: In rails 4.2, should rake db:test:prepare still work?
[15:41:07] arup_r: Ankhers: good way to confirm is to check the output of `rake -T` :D
[15:41:20] arup_r: if it is there, it will work or it will not
[15:44:14] ankhers: arup_r: It is not there, but I'm also not getting an error about not knowing how to build the task.
[15:44:30] dopie: has joined #RubyOnRails
[15:44:56] ankhers: Also, active record appears to be calling it.
[15:45:31] jacksparrow007: has joined #RubyOnRails
[15:45:48] skroon: what is a good way to create a cross platform mobile app these days?
[15:46:17] ferr: has joined #RubyOnRails
[15:46:37] silverdust: What could cause my app to timeout always. I set a timeout of 20s in timeout.rb and when page load is slow I don't think that should have to do with rendering from server-side
[15:46:40] AlexJakeGreen: has joined #RubyOnRails
[15:47:43] silverdust: I think it should have already been sent across the network and the assets time to delivery shouldn't affect the timeout
[15:48:13] arup_r: Ankhers: i never used the task, so not sure what was it's purpose. So I am helpless in this case :/
[15:48:13] ankhers: silverdust: Take a look at the log files to see what the application is going.
[15:48:18] ankhers: s/going/doing
[15:48:53] arup_r: ^^ good suggestion
[15:49:19] ankhers: arup_r: I appreciate the help. It is a task that rails is calling to try to migrate my test database when calling rake test. I guess I'll just try to dig around and figure it out.
[15:50:07] arup_r: Ankhers: you can see rake test:all:db and rake test:db
[15:50:31] silverdust: I have this in my welcome controller http://pastie.org/10707300
[15:50:33] arup_r: both tasks have same defintion though "Run tests quickly, but also reset db"
[15:51:32] silverdust: There are different active record queries being made
[15:51:34] ankhers: arup_r: Thanks. I'm not sure they are quite what I'm looking for though. Like I said, this is something rails is attempting to call internally. I'll just dig through things and see if I can't figure something out.
[15:51:36] silverdust: from the logs
[15:51:53] arup_r: Ankhers: good luck :)
[15:52:21] morfin: can't you in theory get same products on your welcome page?
[15:52:21] silverdust: Also considering that it may be b'cos I'm on a single dyno
[15:52:35] morfin: with very very tiny chances
[15:52:38] silverdust: but I've ran apps that work properly on single dynos in the past (Heroku)
[15:52:45] ankhers: skroon: I think that depends on your definition of good. I still write them in Java and Objective-C / Swift for Android and iOS respectively. I tried using phone gap (corodova?) a couples years ago, it didn't work out for my use case then. It may be better now though.
[15:53:15] ankhers: arup_r: Thanks!
[15:53:27] silverdust: Actually it's not the products I'm using. I probably have to show the views too
[15:53:44] arup_r: Ankhers: see https://github.com/rspec/rspec-rails/issues/936 if you didn't already
[15:53:51] treehug88: has joined #RubyOnRails
[15:53:52] morfin: oh i wiped out my ruby
[15:57:36] tubbo: skroon: i've been thinking about using rubymotion for this app i have to make
[15:57:55] tubbo: it's free to get started now...that was always a detractor toward being an early adopter of the platform
[15:58:03] smathy: has joined #RubyOnRails
[15:58:47] ankhers: arup_r: Unfortunately I have gone through the ticket. Also unfortunate, but I'm using minitest on this project. Thanks though!
[15:58:53] PedramT: has joined #RubyOnRails
[15:59:19] arup_r: ok,, np Ankhers, it seems the task exist http://guides.rubyonrails.org/testing.html#maintaining-the-test-database-schema ,, but yeah, you need to dig deeper.. :)
[15:59:40] jacksparrow007: has joined #RubyOnRails
[15:59:45] jahbrewski: has joined #RubyOnRails
[16:00:19] tubbo: Ankhers: in rails 4.2, the stuff that `rake db:test:prepare` used to do is run inherently by `rake db:migrate`
[16:00:30] barhum2013: has joined #RubyOnRails
[16:00:31] tubbo: not sure if db:test:prepare is still a thing or not, but it certainly doesn't need to be called by you anymore.
[16:02:22] aaronmoodie: has joined #RubyOnRails
[16:03:27] ankhers: tubbo: Looking through things, requiring rails/test_help calls ActiveRecord::Migration.maintain_test_schema!, which calls rake db:test:prepare. Unfortunately, this appears to not be run correctly on my machine, as it calls check_pending! afterwards and raises an exception because not all migrations have been run.
[16:03:58] tubbo: Ankhers: so did you run rake db:migrate?
[16:04:17] ankhers: tubbo: yes.
[16:05:02] tubbo: and it still gives you that error?
[16:05:12] tubbo: try running db:migrate in the test env, RAILS_ENV=test rake db:migrate
[16:07:05] ankhers: That worked.
[16:07:42] chipotle: has joined #RubyOnRails
[16:08:24] arup_r: tubbo: shouldn't it automatically run, when we do the migration in devlopment env ?
[16:08:29] arup_r: just asking
[16:08:45] tubbo: i've had to do that once at the start of development and then never again after that
[16:08:48] tubbo: sometimes
[16:09:15] ankhers: I don't know if it makes a difference, but I'm currently upgrading from rails 3.2 to rails 4.2
[16:10:14] Bloomer: has joined #RubyOnRails
[16:10:42] dopie: Hey guys im pretty much stuck on this and trying to make a db:schema that works
[16:10:45] dopie: https://gist.github.com/staycreativedesign/0708ed62317d1486e95b
[16:10:47] baweaver: has joined #RubyOnRails
[16:10:51] dopie: Does anyone have another solution?
[16:12:12] mhoungbo: has joined #RubyOnRails
[16:12:15] smathy: Screams state machine to me dopie
[16:12:19] ankhers: aren't there wizard gems that makes this kind of stuff fairly simple?
[16:12:34] ankhers: Actually, that makes more sense.
[16:12:41] dopie: state machine?
[16:12:43] chouhoulis: has joined #RubyOnRails
[16:12:49] FooBarWidget: has joined #RubyOnRails
[16:13:11] aegis3121: has joined #RubyOnRails
[16:13:12] FooBarWidget: any actioncable experts out here?
[16:13:14] tubbo: dopie: https://en.wikipedia.org/wiki/Finite-state_machine
[16:13:17] FooBarWidget: I'm trying to get actioncable-examples working: https://github.com/rails/actioncable-examples
[16:13:22] FooBarWidget: but it doesn't work on beta 2
[16:13:30] tubbo: FooBarWidget: i wish :)
[16:13:45] tubbo: also had problems with actioncable-examples
[16:13:47] FooBarWidget: I've filed a bug report, but I'm wondering whether anybody knows how to fix it. https://github.com/rails/actioncable-examples/issues/19
[16:13:49] tubbo: but haven't tried it since the rails 5 beta
[16:14:28] yos7ph: has joined #RubyOnRails
[16:14:40] matthewd: FooBarWidget: Hi!
[16:14:48] matthewd: The first two are expected due to changes in beta2
[16:14:58] siaW: has joined #RubyOnRails
[16:15:08] jahbrewski: has joined #RubyOnRails
[16:15:13] matthewd: The config file was previously called something else... config/redis/cable.yml maybe?
[16:15:26] matthewd: And the logging require can just go away
[16:15:43] FooBarWidget: yup, that's what I did. but the real problem is the third issue
[16:15:49] FooBarWidget: no errors, it just doesn't update
[16:16:10] matthewd: Can you see the WS connection in dev console?
[16:16:23] PedramT: has joined #RubyOnRails
[16:16:29] arup_r: has left #RubyOnRails: ()
[16:16:46] siaW: this line of my policy spec is failing. and i am not sure why https://gist.github.com/siaw23/f76a9385f2493a25da26#file-ticket_policy_spec-rb-L41 i get this failure message. i need some help: https://gyazo.com/fc5832fa1f7de6375518c99aa5681479
[16:17:04] FooBarWidget: hm, looks like the websocket connection failed
[16:17:05] dopie: tubbo: thanks just way over my head
[16:17:10] FooBarWidget: I'm trying to figure this out
[16:17:11] dopie: smathy: thanks :)
[16:17:15] Psy-Q: has joined #RubyOnRails
[16:18:53] cschneid_: has joined #RubyOnRails
[16:19:22] tubbo: FooBarWidget: did your browser block the connection?
[16:19:41] FooBarWidget: I'll get back to you later, I just got a phone call. thanks for the help :)
[16:19:44] theod: has joined #RubyOnRails
[16:20:53] adavia: any rails react book to recommend?
[16:23:03] agit0: has joined #RubyOnRails
[16:23:31] siaW: adavia: http://blog.arkency.com/rails-react/
[16:24:26] Cervajz: has joined #RubyOnRails
[16:24:57] matthewd: FooBarWidget: https://github.com/rails/actioncable-examples/pull/20 works for me
[16:25:54] n00bDev: has joined #RubyOnRails
[16:26:05] HalcyonicStorm: has joined #RubyOnRails
[16:26:17] Cervajz_: has joined #RubyOnRails
[16:26:26] sandstrom: has joined #RubyOnRails
[16:26:35] jahbrewski: has joined #RubyOnRails
[16:27:56] n1lo: has joined #RubyOnRails
[16:31:27] hobodave: has joined #RubyOnRails
[16:33:37] Bloomer: has joined #RubyOnRails
[16:35:31] meves: has joined #RubyOnRails
[16:36:32] dionysus69: has joined #RubyOnRails
[16:37:48] zyzioziom: has joined #RubyOnRails
[16:38:27] rakm: has joined #RubyOnRails
[16:38:35] disgrntld: has joined #RubyOnRails
[16:38:48] jacksparrow007: has joined #RubyOnRails
[16:39:37] Frem: has joined #RubyOnRails
[16:40:02] kitsuneyo: has joined #RubyOnRails
[16:40:38] sonofdirt: has joined #RubyOnRails
[16:43:14] rgtk: has joined #RubyOnRails
[16:43:22] diegoviola: has joined #RubyOnRails
[16:43:35] vedu: has joined #RubyOnRails
[16:44:35] arup_r: has joined #RubyOnRails
[16:44:42] AzaToth: has joined #RubyOnRails
[16:44:52] vedu: Hello. I am getting "translation missing" errors. like: Errors while saving: {"email":["translation missing: en.email.phone.activerecord.errors.models.visitor.attributes.email.blank"]}
[16:45:23] vedu: I just created a rails-api app
[16:45:41] aep: has joined #RubyOnRails
[16:46:27] JoshL: has joined #RubyOnRails
[16:47:05] moeabdol: has joined #RubyOnRails
[16:48:01] cfloare: has joined #RubyOnRails
[16:50:50] kitsuneyo: has joined #RubyOnRails
[16:50:55] aaronr: has joined #RubyOnRails
[16:51:21] blackmesa: has joined #RubyOnRails
[16:51:21] Devalo: has joined #RubyOnRails
[16:52:34] agit0: has joined #RubyOnRails
[16:53:41] pwnd_nsfw: So, this works, however I'm not sure if it could be more efficient https://gist.github.com/SirUncleCid/cb12266ff54ca2287fe3
[16:53:55] SteenJobs: has joined #RubyOnRails
[16:54:19] ZoffixW: has joined #RubyOnRails
[16:54:21] Scient: yes that is super inefficient most likely
[16:54:31] pwnd_nsfw: it has to check each record individually
[16:54:36] pwnd_nsfw: I'm not sure how to go about it otherwise
[16:54:40] Scient: first idea I have is to do a subquery count/exists
[16:55:03] Scient: for every timezone you essentially "reach out" to users and check if there is anything in there with the given timezone
[16:55:10] FooBarWidget: matthewd: yes that pull request works for me too :)
[16:55:14] Scient: a right join _might_ give you the same result, but you'd need to test that out
[16:55:16] FooBarWidget: looks like dhh merged it 5 minutes ago
[16:56:11] arup_r: does after_commit callback happened when transaction is done in ActiveRecord ?
[16:56:25] fox_mulder_cp: FooBarWidget: at rails5?
[16:56:34] ZoffixW: I'm trying to follow the tutorial, but I'm stack on the first start up of the server (http://guides.rubyonrails.org/getting_started.html#hello-rails-bang). I'm getting an error about not finding JS engine and a link to execjs, which I did install with `gem install execjs`. Any ideas? Here's the full output: https://gist.github.com/zoffixznet/40008212bc0d452916c6
[16:56:37] FooBarWidget: rails 5.0.0 beta 2
[16:56:50] ZoffixW: s/stack/stuck/;
[16:57:16] arup_r: FooBarWidget: show me the commit link please
[16:57:22] FooBarWidget: confirmed that actioncable 5.0.0 beta 2 works with passenger
[16:57:33] FooBarWidget: https://github.com/rails/actioncable-examples/commit/4282cd73336a1443074b12eef8f800bcd44be3c4
[16:58:25] HalcyonicStorm: has left #RubyOnRails: ()
[16:58:39] mbreedlove: has joined #RubyOnRails
[16:58:42] Devalo: has joined #RubyOnRails
[16:59:14] matthewd: ZoffixW: Did you check the URL it suggested?
[16:59:36] pwnd_nsfw: Scient, TimeZone.where('id IN (SELECT DISTINCT(time_zone_id) FROM users)')
[16:59:38] pwnd_nsfw: This worked
[16:59:43] pwnd_nsfw: Thanks for your help
[16:59:58] fox_mulder_cp: hm. my rails 5 beta1 app can't upgrade to beta2...
[17:00:08] kitsuneyo: has joined #RubyOnRails
[17:00:55] fox_mulder_cp: says about upgradeing from local git source, where r5b1 staged
[17:01:03] ZoffixW: matthewd, yes, that's how I learned to install execjs. I also see the tut and the execjs docs mention therubyracer gem, which I also installed, but am still getting the error
[17:02:06] [Butch]: has joined #RubyOnRails
[17:02:20] matthewd: ZoffixW: You'll need to add therubyracer to your Gemfile
[17:02:42] lyoshajapan: has joined #RubyOnRails
[17:02:53] ZoffixW: matthewd++ that did the trick
[17:03:07] tubbo: full-stuck developer
[17:03:12] Devalo: Hello. Has anyone tried upgrading their 4.2.5 to 5.0.0b? I'm a bit hesitant about starting a new project, since 5.0.0 is so close to release. 5.0.0 is packed with a lot of new features. Will the process of upgrading the project be pain?
[17:03:38] tego101: has joined #RubyOnRails
[17:03:40] tubbo: Devalo: probably not. there are rake tasks you can run to update your rails app to the current major version.
[17:04:30] tubbo: actually, just one.. `rake rails:update`
[17:04:37] tubbo: i suppose in Rails 5 it will be rails rails:update lol
[17:04:45] B1n4r10: has joined #RubyOnRails
[17:05:15] matthewd: Relevant: https://github.com/rails/rails/pull/23439 :)
[17:05:17] Devalo: So I suppose, once it is released, a gem update rails, then rails rails:update should do the trick?
[17:06:21] kitsuneyo: has joined #RubyOnRails
[17:07:07] fox_mulder_cp: Devalo: hm. gem install rails --pre
[17:07:13] fox_mulder_cp: && bundle update?
[17:07:15] matthewd: Devalo: If you're starting a new project, personally, I'd consider just starting from beta2... there's obviously increased risk you'll run into a bug, but it should be getting close enough
[17:07:24] fox_mulder_cp: but u must update ruby to 2.3.0
[17:07:37] matthewd: (but I'm pretty clearly biased)
[17:07:51] matthewd: Minimum is 2.2.2
[17:08:11] tubbo: matthewd: that's been hit-or-miss for me over the years. any of the 3.x series didn't seem to generate properly in the betas. so i couldn't start new projects.
[17:08:15] fox_mulder_cp: Devalo: u must use release for production apps. for testing and migrating purposes u can use betas
[17:08:23] jottr: has joined #RubyOnRails
[17:08:23] tubbo: but since 4, i've been able to start new projects on the latest beta version and it's been OK
[17:08:56] tubbo: fox_mulder_cp: no you don't.
[17:09:00] User458764: has joined #RubyOnRails
[17:09:02] Pupeno: has joined #RubyOnRails
[17:09:03] tubbo: fox_mulder_cp: "Ruby 2.2.2+ is now also the only supported version of Ruby for Rails." http://weblog.rubyonrails.org/2015/12/18/Rails-5-0-beta1/
[17:09:11] tubbo: so if you're running 2.2.2+ you're OK.
[17:10:12] fox_mulder_cp: tubbo: i knows, thanks.
[17:10:22] Devalo: I had problems installing ruby 2.3. I was only able to install 2.2 lol
[17:10:23] FCser: has joined #RubyOnRails
[17:10:29] fox_mulder_cp: tubbo: but how to migrate from r5b1 to r5b2 in gemfile?
[17:10:44] tubbo: fox_mulder_cp: change 'beta1' to 'beta2' and run `bundle update rails`.
[17:11:06] tubbo: running `bundle update` with no arguments can be dangerous, it's better to just update the gems you know have increased versions.
[17:11:33] fox_mulder_cp: tubbo: in preferred version? thanks, i now migrate from 5b1 to 2.4.5.1 ))
[17:11:42] tubbo: fox_mulder_cp: wat
[17:11:45] fox_mulder_cp: without version in gemfile %)
[17:12:04] tubbo: fox_mulder_cp: i have no idea what you're talking about
[17:12:14] Devalo: I suppose updating from 5.0.0b to 5.0.0 stable would be more seamless than 4.2.5 -> 5.0.0 stable?
[17:12:21] fox_mulder_cp: i comment my r5b1 local git path in Gemfile
[17:12:27] ElFerna_: has joined #RubyOnRails
[17:13:38] snowy: has joined #RubyOnRails
[17:14:06] agit0: has joined #RubyOnRails
[17:16:10] bronson: has joined #RubyOnRails
[17:16:20] lacrymology: has joined #RubyOnRails
[17:17:23] safety_cut: has joined #RubyOnRails
[17:18:16] sneakerhax: has joined #RubyOnRails
[17:22:55] kitsuneyo: has joined #RubyOnRails
[17:24:28] ElFerna_: has joined #RubyOnRails
[17:25:27] diegoviola: has joined #RubyOnRails
[17:26:40] drbayer: has joined #RubyOnRails
[17:26:57] n00bDev: has joined #RubyOnRails
[17:27:03] meves: has joined #RubyOnRails
[17:27:41] The_Phoenix: has joined #RubyOnRails
[17:29:31] chouhoulis: has joined #RubyOnRails
[17:30:32] mbreedlove: has joined #RubyOnRails
[17:30:58] sleungcy: has joined #RubyOnRails
[17:33:40] meves: has joined #RubyOnRails
[17:33:50] madebymarkca: has joined #RubyOnRails
[17:34:35] roshanavand: has joined #RubyOnRails
[17:34:52] mbreedlove: has joined #RubyOnRails
[17:35:13] kitsuneyo: has joined #RubyOnRails
[17:36:03] ferr: has joined #RubyOnRails
[17:37:58] FCser: has joined #RubyOnRails
[17:38:10] Moeh: has joined #RubyOnRails
[17:39:51] pilne: has joined #RubyOnRails
[17:40:00] roshanavand: has joined #RubyOnRails
[17:42:39] Cervajz: has joined #RubyOnRails
[17:44:18] fedexo: has joined #RubyOnRails
[17:44:41] Pazician: has joined #RubyOnRails
[17:44:41] baweaver: has joined #RubyOnRails
[17:45:07] alexclink: has joined #RubyOnRails
[17:47:43] sleungcy: has joined #RubyOnRails
[17:49:17] alexclink: has left #RubyOnRails: ()
[17:49:55] stannard: has joined #RubyOnRails
[17:50:34] alexclink: has joined #RubyOnRails
[17:50:43] rafaelfranca: has joined #RubyOnRails
[17:52:18] lemur: has joined #RubyOnRails
[17:54:11] Cervajz: has joined #RubyOnRails
[17:56:02] xploshioon: has joined #RubyOnRails
[17:57:46] ElFerna_: has joined #RubyOnRails
[18:05:26] Bloomer: has joined #RubyOnRails
[18:06:05] sbarg: has joined #RubyOnRails
[18:06:29] sbarg: has left #RubyOnRails: ()
[18:06:55] PedramT: has joined #RubyOnRails
[18:09:26] Cervajz_: has joined #RubyOnRails
[18:10:41] emachnic: has joined #RubyOnRails
[18:11:19] aarkerio: has joined #RubyOnRails
[18:11:31] stannard: has joined #RubyOnRails
[18:12:35] emachnic_: has joined #RubyOnRails
[18:13:45] drbayer: has joined #RubyOnRails
[18:15:12] confounds: has joined #RubyOnRails
[18:15:27] lacrymology: I'm using STI in combination with accept_nested_attributes. The result is that when I just build an object, I get an instance of the parent model, rather than the actual one I'm trying to create.
[18:15:52] lacrymology: Is there a way to somehow "cast" these objects?
[18:17:25] drbayer: has joined #RubyOnRails
[18:17:40] lacrymology: I'm overriding `recurrence_attributes=` (the STI model) so I could do something there, such as creating a new instance if type is set, or something
[18:18:29] lacrymology: maybe self.recurrence = self.recurrence.type.constantize.build(self.recurrence.attributes) << how's that look?
[18:19:24] aegis3121: has joined #RubyOnRails
[18:21:20] dici: has joined #RubyOnRails
[18:21:32] Pupeno: has joined #RubyOnRails
[18:23:25] n00bDev: has joined #RubyOnRails
[18:23:46] mikecmpbll: has joined #RubyOnRails
[18:24:19] PedramT: has joined #RubyOnRails
[18:24:42] hightower3: has joined #RubyOnRails
[18:25:12] hahuang65: has joined #RubyOnRails
[18:27:43] diego2: has joined #RubyOnRails
[18:27:46] The_Phoenix1: has joined #RubyOnRails
[18:27:47] diego2: has joined #RubyOnRails
[18:31:12] ^CrYpto^: has joined #RubyOnRails
[18:33:07] worknick: has joined #RubyOnRails
[18:33:10] joy4u: has joined #RubyOnRails
[18:33:11] momomomomo: has joined #RubyOnRails
[18:33:16] joy4u: has left #RubyOnRails: ()
[18:33:25] creyes: has joined #RubyOnRails
[18:33:26] worknick: how can i concatenate jq variables in <%= escape_javascript() %> ??
[18:33:32] B1n4r10: has joined #RubyOnRails
[18:35:01] moeabdol: has joined #RubyOnRails
[18:35:15] worknick: in applacation.js
[18:35:40] emachnic: has joined #RubyOnRails
[18:38:10] tubbo: worknick: !gist the code you're working with
[18:38:10] helpa: worknick: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[18:39:14] lyoshajapan: has joined #RubyOnRails
[18:39:17] konsolebox: has joined #RubyOnRails
[18:41:33] FooMunki: has joined #RubyOnRails
[18:42:10] claytonzaugg: has joined #RubyOnRails
[18:42:46] srinidhi: has joined #RubyOnRails
[18:42:47] PedramT_: has joined #RubyOnRails
[18:43:10] stannard: has joined #RubyOnRails
[18:43:54] aaronmoodie: has joined #RubyOnRails
[18:45:32] Sirithcam: has joined #RubyOnRails
[18:45:46] rrawlins: has joined #RubyOnRails
[18:46:31] adavia: has joined #RubyOnRails
[18:49:12] nunchuck: has joined #RubyOnRails
[18:50:32] siaW: has joined #RubyOnRails
[18:50:36] febuiles: has joined #RubyOnRails
[18:52:24] madebymarkca: has joined #RubyOnRails
[18:52:38] adac: has joined #RubyOnRails
[18:53:06] baweaver: has joined #RubyOnRails
[18:54:44] nettoweb: has joined #RubyOnRails
[18:55:06] Pulp: has joined #RubyOnRails
[18:56:28] mooru: has joined #RubyOnRails
[18:56:41] SteenJobs: has joined #RubyOnRails
[18:58:44] baweaver: has joined #RubyOnRails
[19:00:55] [Butch]: has joined #RubyOnRails
[19:01:04] skroon_: has joined #RubyOnRails
[19:01:24] Cohedrin: has joined #RubyOnRails
[19:02:12] User458764: has joined #RubyOnRails
[19:05:19] safety_cut: has joined #RubyOnRails
[19:06:54] neanderslob: has joined #RubyOnRails
[19:07:02] JohnBat26: has joined #RubyOnRails
[19:07:17] stannard: has joined #RubyOnRails
[19:08:41] yfeldblum: has joined #RubyOnRails
[19:10:30] jottr: has joined #RubyOnRails
[19:12:07] aegis3121: has joined #RubyOnRails
[19:14:45] fox_mulder_cp: has joined #RubyOnRails
[19:14:57] lord4163: has joined #RubyOnRails
[19:16:05] fmcgeough: has joined #RubyOnRails
[19:18:03] baweaver: has joined #RubyOnRails
[19:21:37] Andr3as: hello everyone
[19:23:06] neanderslob: hi all, I'm currently trying to manually create an entry in a join table but am having a little trouble
[19:23:10] neanderslob: more info here: https://gist.github.com/BigMcLargeHuge/2af6a21b1639ff5dfae3
[19:23:12] k13nox: has joined #RubyOnRails
[19:23:34] kenpoint: has joined #RubyOnRails
[19:23:47] neanderslob: any guidance would certainly be appreciated
[19:26:23] Andr3as: i've a code design question regarding some charts.. i am about to have quite a few charts with diferent data on a show action for a stock.. i've found this nice gem "google_visualr" and like it as it encapsules all that js.. now they propose to put the chart creation into the controller (stock controller in my case) but i dont like that.. my limited knowledge prevents me from fully grasp the proper way to go.. hwo would you guys do it?
[19:26:23] Andr3as: creating a dedicate "ChartsController"?
[19:26:48] Andr3as: i have no code right now, just looking for some input to move on
[19:27:13] skroon_: has left #RubyOnRails: ()
[19:27:39] pawnbox: has joined #RubyOnRails
[19:27:54] tubbo: i guess if you're generating the chart yourself, yeah do that
[19:28:02] neanderslob: Andr3as: my intuition says that putting it in the stock controller as a nested attribute would be the right idea
[19:28:04] tubbo: Andr3as: google charts didn't work out for ya?
[19:28:18] tubbo: neanderslob: a "nested attribute" in the stock controller huh? :P
[19:28:33] dopie: tubbo: is there an easier way to do this.. you said state machine but im having trouble implementing it
[19:28:33] Andr3as: tubbo: this is more or less google charts
[19:28:35] dopie: https://gist.github.com/staycreativedesign/2e4fde3ed796e3f6ca67
[19:28:37] Andr3as: based on that
[19:28:46] tubbo: Andr3as: why not just use google charts?
[19:29:14] tubbo: dopie: ah i see now, it's a lot more clear than the previous revision.
[19:29:22] dopie: tubbo: thanks :)
[19:29:36] dopie: I just had to sit down and just write pseudo code
[19:29:52] tubbo: dopie: this sounds kinda like how we implement checkout steps at work. each Checkout::Step object is actually an ActiveModel::Model and has validations
[19:30:07] tubbo: but in your case, an admin has to approve each step. so you'd probably want the steps to all be actual models.
[19:30:10] neanderslob: tubbo: would it be more kosher to say put it in the controller and modify it as a nested attribute of stocks?
[19:30:14] Andr3as: tubbo: am not sure how to implement properly.. coding beginner and so on.. too much information
[19:30:21] benhuda: has joined #RubyOnRails
[19:30:28] dopie: How do i deal with documents?
[19:30:44] tubbo: dopie: i think you should have a record holding all the approved information, and then each step record is basically recording the "interim" values for an admin to approve. when an admin approves, you can just copy the data from the step into the "main" record.
[19:30:47] uris: has joined #RubyOnRails
[19:31:20] mdw: has joined #RubyOnRails
[19:31:30] worknick: tubbo: this is my jq. $('.flwbtn').html("<%= escape_javascript(render(:partial => 'shared/unfollowpets', :object{:user_id=>'+$('.userid').text()+', :pet_id=>'+$('.petid').text()+', :data=>'+data.id+'})) %>"); it literally puts the code itself on the page instead of rendering the partial.
[19:32:11] IrishGringo: has joined #RubyOnRails
[19:32:13] tubbo: worknick: yeah, i think escape_javascript will escape html and stuff so that it won't be rendered.
[19:32:23] dopie: tubbo: so how would I create the documents model?
[19:32:30] worknick: tubbo: how to make it work then?
[19:32:32] tubbo: dopie: rails generate model
[19:32:49] dopie: I know that but... my problem is i have to have 1 form for various documents
[19:33:04] tubbo: worknick: is that partial ever rendered on the server side?
[19:33:05] dopie: when i do form_for how would i distinguish between documents
[19:33:11] tubbo: dopie: how do you do it now?
[19:33:24] worknick: tubbo: yes. when user loads that page and already followunig pet and i render the unfollow partial
[19:33:24] tubbo: dopie: like between each step
[19:33:33] dopie: on each step
[19:33:34] tubbo: i was assuming each of those steps were separate objects or records.
[19:33:51] Andr3as: maybe as a side note, neanderslob and tubbo, it should be like this: i want to have a show page for a particular stock and that stock has "peers" (read other stocks in the same sector) and also does it belong to an index (like apple is the stock and s&p500 the index) - in the end there should be 3 charts (or maybe some more, a few sdtatistics 'n' such)
[19:33:57] User458764: has joined #RubyOnRails
[19:34:19] Andr3as: so there are a few different controllers involved
[19:34:25] tubbo: worknick: noticed that you're doing html("") and in escape_javascript you're "interpolating" with ''
[19:34:32] Andr3as: hence the hesitation to put it into the stocks controller
[19:34:34] dopie: well step one has 2 documents
[19:34:43] dopie: how in the form_for do i tell those apart
[19:34:44] nettoweb: has joined #RubyOnRails
[19:34:49] tubbo: worknick: so first of all i think you want to interpolate with double-quotes if you're gonna surround the args to html() with double-quotes
[19:35:01] worknick: tubbo: shall i do reverse?
[19:35:10] tubbo: dopie: the form_for i guess should be backed by a form object.
[19:35:11] Andr3as: apart from using this gem, i guess using google charts directly wont chance anything on my situation, would it?
[19:35:28] tubbo: dopie: that way form_for @whatever points to your form object, and that form object handles some validation and saving data into each step
[19:36:11] tubbo: dopie: in addition, you could implement acts_as_state_machine or whatever it's called now (just AASM? I dunno, haven't needed it in a while) so the model knows what step its on, and it can validate things accordingly for that step.
[19:36:17] sandstrom: has joined #RubyOnRails
[19:36:22] febuiles: has joined #RubyOnRails
[19:36:38] tubbo: dopie: but this seems way too complicated for a single model. it would be easier on you if each step was its own AR model.
[19:37:03] worknick: tubbo: i dont understand. where to put "" and where to put ''??
[19:37:15] drbayer: has joined #RubyOnRails
[19:37:48] tubbo: worknick: oh wait that's not all you need. hold a sec.
[19:38:00] neanderslob: Andr3as: If you necessarily want the charts to appear in stocks#show, what's stopping you from calling the charts from that controller (along with any other controllers you want them to appear from)
[19:38:01] dopie: so step_one is a model
[19:38:32] dragonkh: has joined #RubyOnRails
[19:38:37] tubbo: worknick: actually you might not be able to do this without duplicating the template
[19:38:44] ur5us: has joined #RubyOnRails
[19:38:52] tubbo: it would be way easier to do a JST['your/template'](userID, petID);
[19:39:54] worknick: whatsn JST?
[19:40:07] dopie: tubbo: so inside the step_one.rb model I would include what?
[19:40:09] Andr3as: neanderslob: well, i want some other charts as well, not quite sure yet which ones.. and i thought this would blow up my controller.. apart from the fact that a controller really shouldnt draw charts (or maybe i got the mvc wrong..?)
[19:40:28] tubbo: dopie: i'm not writing the code for you :)
[19:40:37] dopie: I know youre not
[19:40:39] tubbo: dopie: that should be obvious.
[19:40:49] dopie: the files that need to be in step one
[19:41:42] neanderslob: Andr3as: well, I certainly don't quite understand how the gem in question works, but I'm guessing it grabs data on that stock from the database and then renders it in the view in a slick chart
[19:41:46] neanderslob: Andr3as: sounds appropriate to me
[19:42:14] neanderslob: Andr3as: unfortunately I have to run but I'll be back on in another 10 min
[19:42:20] manfrin: has joined #RubyOnRails
[19:42:29] Andr3as: neanderslob: aight.. thanks so far, will catch up later
[19:43:34] djbkd: has joined #RubyOnRails
[19:46:49] Andr3as: tubbo: lets say i'd use google charts directly.. how would i start? its a little overwhelming when you are a beginner
[19:48:59] tubbo: Andr3as: yeah i agree. google classically has hard to read docs.
[19:49:14] Andr3as: no, i mean thsi is rather easy
[19:49:27] Andr3as: more like where to put code
[19:49:31] tubbo: Andr3as: anyway, a google chart should be an embeddable widget that you pre-load with data. so you'd basically include a <script> tag that actually does the job of drawing the chart, but before that you set a magic variable somewhere in your page which the chart will pull from and grab the data.
[19:50:01] meves: has joined #RubyOnRails
[19:50:05] Andr3as: yeah, so you do script tags in your views?
[19:50:16] Andr3as: or do you put them anywhere else?
[19:50:29] Andr3as: whats that coffeescript file for?
[19:51:48] rubyonrails733: has joined #RubyOnRails
[19:52:21] dionysus69: has joined #RubyOnRails
[19:55:21] lacrymology: has joined #RubyOnRails
[19:56:05] gheegh: has joined #RubyOnRails
[19:56:37] momomomomo: has joined #RubyOnRails
[19:58:20] ElFerna_: has joined #RubyOnRails
[19:58:44] tubbo: Andr3as: yeah...google charts should give you code to embed.
[19:58:46] tubbo: and some examples.
[19:59:35] neanderslob_: has joined #RubyOnRails
[20:00:00] Andr3as: so it sperfectly valid "rails coding" to put that within multiple script tags inside your view? - its not like the worst mistake one could possibly make?
[20:00:10] neanderslob: has joined #RubyOnRails
[20:00:21] someish: has joined #RubyOnRails
[20:01:13] Andr3as: i thought one should put that anywhere in its own controller doing some magic stuff and so on.. but hey, if this is what's common.. even better, i proly get that together
[20:01:14] aegis3121: has joined #RubyOnRails
[20:01:38] neanderslob: Andr3as: alright, back on, still trying to figure it out?
[20:03:45] tubbo: Andr3as: it really depends on the situation.
[20:03:53] dopie: ok tubbo here is my question
[20:03:53] dopie: https://gist.github.com/staycreativedesign/6e7419e51de4a7a7ce0f
[20:04:10] Andr3as: neanderslob: still thinking about it - am not sure which way to go
[20:04:31] tubbo: dopie: why not have two records with identical schema? one is the record that was input, the other is the record that the admin approves
[20:04:32] smathy: dopie, we covered this yesterday with the bitmask idea.
[20:04:44] dopie: smathy: that seemed to complicated
[20:05:05] neanderslob: Andr3as: remind me, which plugin are you using?
[20:05:09] neanderslob: Andr3as: or gem rather
[20:05:14] dopie: smathy: I can't implement something I don't really understand ...
[20:05:23] Andr3as: https://github.com/winston/google_visualr
[20:05:31] Andr3as: well, i have a chart up and running
[20:05:46] Andr3as: its just about the proper places to put the code in
[20:05:55] tubbo: dopie: like this https://gist.github.com/tubbo/70a8a102266282bb01e9
[20:06:09] Andr3as: like i said, i feel uncomfortable to have like 10 different charts hardcoded in my controller
[20:06:19] mices: what does this mean <%= render 'likes/form', likeable: resource %>
[20:06:24] tubbo: dopie: you implement stuff you don't really understand every day. i know that because you're here.
[20:06:27] Andr3as: i thought the got to be a better way
[20:06:27] pwnd_nsfw: oh no, now I have to figure out how to deploy angular/rails app to heroku...
[20:06:32] GreekFreak: has joined #RubyOnRails
[20:06:39] dopie: tubbo: I know :) but im trying to understand this time
[20:06:44] tubbo: pwnd_nsfw: git push heroku
[20:06:58] tubbo: dopie: you won't understand something until you implement it :)
[20:07:30] dopie: ugh any schooling I should take other than reading books that don't really help
[20:07:33] pwnd_nsfw: tubbo, but the assets aren't transferred correctly
[20:07:34] pawnbox: has joined #RubyOnRails
[20:07:34] dopamean_: has joined #RubyOnRails
[20:07:46] arup_r: has joined #RubyOnRails
[20:07:53] tubbo: pwnd_nsfw: are you serving your assets on a CDN or something?
[20:08:01] jottr: has joined #RubyOnRails
[20:08:05] pwnd_nsfw: If I was, it wouldn't be a problem.
[20:08:25] tubbo: dopie: you basically want some kind of record to end up with all the approved data, right?
[20:08:39] tubbo: but you need records to store the data that hasn't yet been approved.
[20:08:50] tubbo: so you need two records, at a minimum...if i'm understanding the problem right
[20:09:07] GreekFreak: For some reason my production server complains about "ActionController::RoutingError (No route matches [GET] "/assets/images/ui-bg_highlight-soft_100_f6f6f6_1x100.png")" I'm using jQuery UI and on an Apache server. I've tried putting the stylesheet and images in different locations but still nothing. The assets exist in the assets folder in the server. Any ideaS?
[20:09:11] pwnd_nsfw: I honestly cna't figure out where to put it
[20:09:14] baweaver: has joined #RubyOnRails
[20:09:33] neanderslob: Andr3as: are they the same 10 charts each time?
[20:09:44] smathy: dopie, I added a comment to your model.
[20:09:52] smathy: dopie, *gist
[20:09:59] tubbo: pwnd_nsfw: put what
[20:10:00] Andr3as: neanderslob: jsut for the records, this is how it is now (am just experimenting) https://gist.github.com/awunder/f38ff1dd1b5f580287ae
[20:10:18] tubbo: GreekFreak: believe the correct path is /assets/your-image.jpg
[20:10:23] tubbo: not /assets/images/your-image.jpg
[20:10:34] Cervajz: has joined #RubyOnRails
[20:10:51] Andr3as: neanderslob: in that show, probably, but app wide proly a couple more.. and i was planning to have a somewaht flexible charting possiblity for the users as in chosing symbols to chart
[20:11:46] pwnd_nsfw: where the js from bower-rails was isntalled lol
[20:13:29] Cervajz__: has joined #RubyOnRails
[20:14:05] tubbo: pwnd_nsfw: oh, that might be a problem. bower-rails is definitely *not* the best choice imho for getting bower assets into your rails app
[20:14:17] ankhers: Do strong parameters and nested attributes work together?
[20:14:20] tubbo: pwnd_nsfw: i've deployed several apps to heroku using rails-assets.org
[20:14:24] tubbo: Ankhers: yes.
[20:14:26] GreekFreak: tubbo, no difference. I have added the jquery images in images/images AND image/ (if I add them in images/ they don't work in development but they work if I add them in images/images)
[20:14:41] tubbo: GreekFreak: nah they definitely should be in app/assets/images
[20:15:17] ankhers: Alright. Is there any way to debug why a specified attribute is still listed in the unpermitted parameter list?
[20:15:28] blackmesa: has joined #RubyOnRails
[20:15:59] GreekFreak: tubbo, when I add the images of the jquery in app/assets/images they don't appear in my app, but they do appear when I add them in app/assets/images/images. Is there maybe something I need to set?
[20:16:05] arup_r: GreekFreak: and you should be referring them like asset_path helper.
[20:16:05] arup_r: font_path, image_path, audio_path etc...
[20:16:40] FernandoBasso: has joined #RubyOnRails
[20:16:47] arup_r: if you reference them manually, it will give all GET no route found error.. as you are getting
[20:16:49] GreekFreak: arup_r, I don't refer to them. I simply do .button: primary-image "ui-example-icon" in my coffee file
[20:17:25] arup_r: those errors comes even from CSS, when you don't reference then using any such path helpers
[20:17:38] GreekFreak: tubbo, arup_r all my images appear correctly in the app. It's just the jQuery ones
[20:18:06] tubbo: eww they use images for icons? :P
[20:18:12] tubbo: jquery ui suuucks
[20:18:31] tubbo: GreekFreak: are you using jquery-ui-rails by chance?
[20:18:39] neanderslob: Andr3as: unless I'm going against something specific you heard, I'm just not sure it's worth worrying about. If your #show is comprised of X number of charts, then X number of charts have to be created; I say build it then worry about optimizing (just my 2 cents)
[20:18:43] tubbo: now that is very strange
[20:18:44] drbayer: has joined #RubyOnRails
[20:18:48] tubbo: because that's worked for me in the past
[20:18:57] arup_r: That's the exact reason, you got errors.
[20:19:08] GreekFreak: arup_r, please explain...
[20:19:33] GreekFreak: tubbo, it's worked for me too
[20:19:36] Ethan: has joined #RubyOnRails
[20:19:37] neanderslob: Andr3as: btw, if you're really worried about it, you might enjoy checking out service methods: https://blog.engineyard.com/2014/keeping-your-rails-controllers-dry-with-services
[20:19:42] arup_r: GreekFreak: see, I knew it is from CSS. please do what I said, and then get back to us again
[20:20:01] Andr3as: neanderslob: i've heard nothing so far, am jsut asking for some hints.. thanks for digging into it..
[20:20:15] GreekFreak: arup_r, I've already tried that by adding all the images in the app/assets/images and it still didn't work
[20:20:23] celly: has joined #RubyOnRails
[20:20:24] tubbo: arup_r: he can't do that in a CSS file, plus it's being pulled in from a gem...the gem imho should already have figured that shit out.
[20:20:27] neanderslob: Andr3as: good luck then!
[20:20:51] Andr3as: hehe, thank you, also for that link, looks interesting
[20:20:54] GreekFreak: tubbo, that's what I thought
[20:21:43] tubbo: GreekFreak: unless there's something you're configuring improperly...or you updated the JS without updating the images somehow (i really don't know how that gem works), it might be a bug and you may need to create a GH issue.
[20:22:47] GreekFreak: tubbo, my only other option is to edit the jquery-ui.css file and remove the "/image" from every image
[20:24:32] Andr3as: neanderslob: that article is more or less exactly what i was thinking about.. thanks for that
[20:24:53] Aherin: has joined #RubyOnRails
[20:24:56] neanderslob: Andr3as: no prob, it's served to keep my code DRY on several occasions
[20:25:36] ^CrYpto^: has joined #RubyOnRails
[20:25:37] Cohedrin: has joined #RubyOnRails
[20:27:42] dopie: ugh any schooling I should take other than reading books that don't really help
[20:28:01] dcunit3d: has joined #RubyOnRails
[20:28:09] dopie: tubbo: what was your gist link?
[20:28:29] dopie: ahhh i got it
[20:29:07] k13nox: has joined #RubyOnRails
[20:29:58] lacrymology: has joined #RubyOnRails
[20:32:07] fox_mulder_cp: how fix this code for a best practice? <li><%= link_to raw('<i class="fa fa-users"></i>'+ t'Users'), users_path %></li>
[20:32:14] smathy: dopie, hack more.
[20:32:35] mhoungbo: has joined #RubyOnRails
[20:32:45] fox_mulder_cp: i want for font-awesome pic was a link with translated 'Users' text
[20:32:45] smathy: fox_mulder_cp, look up content_tag
[20:33:03] smathy: fox_mulder_cp, and make a helper.
[20:33:20] emachnic: has joined #RubyOnRails
[20:33:28] tubbo: fox_mulder_cp: https://gist.github.com/tubbo/58329f0152933450c673
[20:33:36] tubbo: use block syntax
[20:33:52] PedramT: has joined #RubyOnRails
[20:33:52] pwnd_nsfw: tubbo, so I basically will just have those packages instead of in bower.json, they'd be in my gemfile
[20:36:45] arooni: has joined #RubyOnRails
[20:36:56] drbayer: has joined #RubyOnRails
[20:37:41] juddey: has joined #RubyOnRails
[20:38:21] tubbo: pwnd_nsfw: yep
[20:38:24] tubbo: sooo much easier imho
[20:38:37] pwnd_nsfw: it's certainly interesting
[20:38:51] PedramT: has joined #RubyOnRails
[20:42:36] sbarg: has joined #RubyOnRails
[20:42:39] FooMunki: has joined #RubyOnRails
[20:46:38] dopamean_: has joined #RubyOnRails
[20:47:03] serbalgi: has joined #RubyOnRails
[20:50:12] Felix444: has joined #RubyOnRails
[20:50:33] Psy-Q: has joined #RubyOnRails
[20:53:19] DoubleMalt: has joined #RubyOnRails
[20:53:54] lemur: has joined #RubyOnRails
[20:54:55] claytonzaugg: has joined #RubyOnRails
[20:56:07] flashpoint9: has joined #RubyOnRails
[20:57:59] Pupeno: has joined #RubyOnRails
[20:58:01] IrishGringo: has joined #RubyOnRails
[20:58:20] n1lo: has joined #RubyOnRails
[20:59:57] Yeomra: has joined #RubyOnRails
[21:00:35] safety_cut: has joined #RubyOnRails
[21:01:17] jklass: has joined #RubyOnRails
[21:03:00] mostlybadfly: has joined #RubyOnRails
[21:03:24] dopamean_: has joined #RubyOnRails
[21:04:55] emachnic: has joined #RubyOnRails
[21:05:49] sandstrom: has joined #RubyOnRails
[21:06:46] ferr: has joined #RubyOnRails
[21:08:08] mrgreenfur: has joined #RubyOnRails
[21:08:23] GreekFreak: Im using the 'jquery-ui-rails' gem with a theme created on themeroller. I have added the jquery-ui.css and its images folder in vendor/assets/stylesheets/. In development I see all the images/icons but in production it keeps complaining "ActionController::RoutingError (No route matches [GET] "/assets/images/ui-bg_highlight-soft_100_f6f6f6_1x100.png")" Any advice would be appreciated.
[21:10:49] sonofdirt: has joined #RubyOnRails
[21:11:47] Pazician: has joined #RubyOnRails
[21:11:48] speaking1ode: has joined #RubyOnRails
[21:11:56] smathy: GreekFreak, you running the precompile in production?
[21:12:40] dopamean_: has joined #RubyOnRails
[21:12:46] GreekFreak: smathy, no, I think capistrano does it for me
[21:12:56] nerium: has joined #RubyOnRails
[21:13:20] GreekFreak: smathy, sorry, I meant yes. it gets handled by capistrano
[21:13:40] meves: has joined #RubyOnRails
[21:14:11] nerium: It should be possible to get a secret token from a record in rails 5. Anyone knows what the method is called?
[21:14:52] smathy: GreekFreak, how are you producing the above path? Are you using the Rails helpers?
[21:14:56] mrgreenfur: anyone have any hosting recommendations? I???m on a VPS now, but dont??? love the sysadmin work and heroku is crazy expensive.
[21:15:04] mrgreenfur: is there anything people recommend in betweeN?
[21:15:35] unreal: has joined #RubyOnRails
[21:16:42] moeabdol: has joined #RubyOnRails
[21:17:03] GreekFreak: smathy, no. I simply give the .coffee file I simply do "$("my_element").button icons: primary: "ui-icon-home" " And jquery deals with it (I'm assuming either jquery-ui or jquery-ui-rails gem)
[21:20:16] drbayer: has joined #RubyOnRails
[21:20:24] GeorgeJipa: has joined #RubyOnRails
[21:20:50] Cervajz: has joined #RubyOnRails
[21:21:17] ankhers: if I use Rails.application.routes.draw in a test, would that overwrite all of my routes for the application?
[21:21:35] fox_mulder_cp: Ankhers: why override?
[21:21:51] shanemcd: has joined #RubyOnRails
[21:22:01] ankhers: I don't want it to, but I'm getting a couple errors when using that because it can't find a foo_url method.
[21:22:04] baweaver: has joined #RubyOnRails
[21:22:48] fox_mulder_cp: Ankhers: error message to gist.github please
[21:22:58] aaronmoodie: has joined #RubyOnRails
[21:23:04] meoblast001: has joined #RubyOnRails
[21:24:29] fox_mulder_cp: tubbo: wow.. about icon... hm. i test it now..
[21:24:31] smathy: GreekFreak, the jquery-ui-rails gem includes an updated css.erb that adds the image_path helper so Rails can locate the assets in the asset pipeline: https://github.com/joliss/jquery-ui-rails/blob/master/app/assets/stylesheets/jquery-ui/theme.css.erb It hasn't done anything to help you with other themes though.
[21:25:19] RegulationD: has joined #RubyOnRails
[21:25:32] GreekFreak: smathy, does that mean I cannot use it with my custon theme?
[21:25:50] k13nox: has joined #RubyOnRails
[21:26:32] smathy: GreekFreak, you can either do something similar, or skip the asset pipeline, or don't host it yourself.
[21:26:38] GreekFreak: smathy, I ask because I've set it up exactly the same way as in my other app (Rails 3.2.18) and it works fine
[21:27:06] GreekFreak: smathy, how do I skip the asset pipeline for the jquery stuff?
[21:27:42] adac: has joined #RubyOnRails
[21:28:17] fox_mulder_cp: hm, i want use ansible from my ruby script, i must call it as standart shell command executing or have a ready gems? ansible-rails git is 404 (
[21:28:45] moeabdol1: has joined #RubyOnRails
[21:29:15] ElFerna_: has joined #RubyOnRails
[21:29:18] disgrntld: has joined #RubyOnRails
[21:29:48] tubbo: fox_mulder_cp: it's amazing what you'll discover by reading the README.
[21:30:04] smathy: GreekFreak, I'd have to double-check the paths, but assuming it's all relative, just move the main CSS file to a static path like public/jquery-themes and add that as a stylesheet_link_tag to your layout template.
[21:30:53] fox_mulder_cp: tubbo: ansible-rails readme or?
[21:31:04] tubbo: fox_mulder_cp: that was a response to fox_mulder_cp | tubbo: wow.. about icon... hm. i test it now..
[21:31:14] iammiles: has joined #RubyOnRails
[21:31:42] solars: has joined #RubyOnRails
[21:32:02] fox_mulder_cp: tubbo: i try some weeks ago and thia helper fails for me..
[21:32:11] fox_mulder_cp: but block idea
[21:32:26] mpowers: has joined #RubyOnRails
[21:32:34] GreekFreak: smathy, thanks, I'll give that a try. my other attempt at the moment is to edit the main CSS file and change it to .css.erb file and use the helper and see if that works
[21:32:45] dopamean_: has joined #RubyOnRails
[21:32:57] chipotle: has joined #RubyOnRails
[21:33:10] smathy: GreekFreak, yep, as I mentioned above, you'd need to update all paths to use the Rails helpers - as the jquery-ui-rails gem does.
[21:33:15] momomomomo: has joined #RubyOnRails
[21:33:41] GreekFreak: smathy, thank you. You've actually pointed me in a good direction to find a solution. I'll let you know what worked
[21:33:49] fox_mulder_cp: tubbo: what template generator u use? not <%= bla %> tag
[21:33:53] smathy: GreekFreak, you're welcome.
[21:34:27] yfeldblum: has joined #RubyOnRails
[21:34:49] tubbo: fox_mulder_cp: haml
[21:36:00] fox_mulder_cp: tubbo: and how use your gist in standart <%= ..?
[21:37:12] tubbo: fox_mulder_cp: what
[21:37:24] tubbo: no idea what you're saying
[21:37:43] pawnbox: has joined #RubyOnRails
[21:37:48] fox_mulder_cp: tubbo: can i rewrite your haml gist content for rails standart template genereator?
[21:38:01] djbkd: has joined #RubyOnRails
[21:38:35] B1n4r10: has joined #RubyOnRails
[21:41:07] pwnd_nsfw: Thanks tubbo
[21:42:51] pwnd_nsfw: Now I need to figure out why js keeps thinking I'm sending different data D:
[21:43:09] momomomomo: has joined #RubyOnRails
[21:47:04] bronson: has joined #RubyOnRails
[21:47:24] timdotrb: has joined #RubyOnRails
[21:55:56] treehug88: has joined #RubyOnRails
[21:56:07] shanemcd: has joined #RubyOnRails
[21:56:18] tubbo: fox_mulder_cp: it's a free country
[21:57:01] Intii: has joined #RubyOnRails
[21:57:58] Intii: Hi everyone, I want to use this gem: https://github.com/thoughtbot/ember-cli-rails to use ember for the front end of my app. The backend is developed via Rails but it's my understanding that both the frontend and the api will be in the same codebase/server. Is this a proper practice?
[21:58:43] shanemcd: has joined #RubyOnRails
[21:58:54] gavinhughes: has joined #RubyOnRails
[21:59:33] roshanavand: has joined #RubyOnRails
[22:00:35] pwnd_nsfw: I really have no idea what is going on with this lmao
[22:00:53] pwnd_nsfw: Rails is sending correct data, angular is interpreting half of it the way it wants
[22:06:38] futilegames: has joined #RubyOnRails
[22:07:25] Intii: has joined #RubyOnRails
[22:07:31] mpowers: Is this the right chat to ask questions about ActiveRecord?
[22:08:44] unreal: has joined #RubyOnRails
[22:09:09] tubbo: mpowers: yes
[22:09:35] baweaver: has joined #RubyOnRails
[22:09:42] spellbook: has joined #RubyOnRails
[22:09:59] blackmesa: has joined #RubyOnRails
[22:10:51] mpowers: Thanks! I have a few questions. First, my application is built with postgresql. I want to use a postgres-specific SQL extension, the RETURNING clause. Is there any easy way to do this in activerecord, without doing like, raw SQL queries? or any known third-party gems that allow this?
[22:11:23] ferr: has joined #RubyOnRails
[22:12:11] lubekpl: has joined #RubyOnRails
[22:12:31] ElFerna: has joined #RubyOnRails
[22:12:43] carlosd: has joined #RubyOnRails
[22:14:27] momomomomo: has joined #RubyOnRails
[22:14:45] ql6wlld: has joined #RubyOnRails
[22:14:55] mpowers: Second question, I find myself wanting to mix counter-like update semantics with other updates. like, UPDATE users set name = "foo", edit_count = edit_count + 1 WHERE id = 17; I know that increment_counters can do one part of that, and update_all can do the other part, but is there a way to combine them into a single statement?
[22:14:58] dm_24: has joined #RubyOnRails
[22:16:47] lemur: has joined #RubyOnRails
[22:17:02] GreekFreak: smathy, I tried editing the CSS file and it didn't work. I'm now trying to take them out the asset pipeline, by putting the css and its images file in app/jquery_themes/ . I now get the error No route matches [GET] "/jquery_themes/jquery-ui.css"
[22:17:05] zyzioziom: has joined #RubyOnRails
[22:17:15] dm_24: is there a way to authorize a user under additional scopes, after they have already logged in with devise/omniauth?
[22:18:00] dm_24: for example, user logs in with regular google_oauth2 strategy/scope... but then later on they press a button in the site that 'upgrades' their account status to include the google drive scope, for example
[22:18:21] safety_cut: has joined #RubyOnRails
[22:19:04] lubekpl: has joined #RubyOnRails
[22:21:01] halcyonicstorm1: has joined #RubyOnRails
[22:21:23] jottr_: has joined #RubyOnRails
[22:22:01] carlosd: I would like to add some time zones to be returned by ActiveSupport::TimeZone.all
[22:22:55] carlosd: add the time zones that I want to ActiveSupport::TimeZone::MAPPING is a good solution?
[22:23:04] safety_cut: has joined #RubyOnRails
[22:24:28] safety_cut: has joined #RubyOnRails
[22:24:44] tubbo: carlosd: yeah i think that's what you have to do
[22:24:59] NBarnes: has joined #RubyOnRails
[22:26:00] deweysdecimal: has joined #RubyOnRails
[22:26:00] mustmodify: has joined #RubyOnRails
[22:26:43] NBarnes: has joined #RubyOnRails
[22:27:40] baweaver: has joined #RubyOnRails
[22:28:39] pawnbox: has joined #RubyOnRails
[22:29:20] deweysdecimal: hey guys, I'm having problems with a multi select box including a blank value at the beginning of the array
[22:29:50] deweysdecimal: I'm attempting to strip the blank value so it doesn't fail validation, but I haven't had any luck
[22:30:02] deweysdecimal: but I am able to print the array to the console with the value stripped
[22:30:23] spellbook: hi. i have a question. i'm working on a rails app with a javascript frontend. but i am making ajax calls to an external api every 15min and the api requires a key. since this is a security risk, i'm assuming that i should be making the api calls on the server side instead using something like httparty, but how do i make the calls every 15 min? or is there a way that i can keep the calls on the client side?
[22:30:48] mustmodify: has left #RubyOnRails: ()
[22:31:16] NBarnes: has joined #RubyOnRails
[22:31:47] deweysdecimal: spellbook: I just dealt with a similar problem, but not with Rails. I was using the YouTube API, and in the developer console you can limit requests to a particular domain
[22:32:05] deweysdecimal: spellbook: so it doesn't really matter if your API key is public
[22:32:23] deweysdecimal: spellbook: Not sure if that applies to you or not, but just a thought
[22:32:39] Devalo: has joined #RubyOnRails
[22:32:59] spellbook: deweysdecimal: i see. i'll look into that. thanks
[22:33:09] Coldblackice: has joined #RubyOnRails
[22:34:55] NBarnes: has joined #RubyOnRails
[22:36:37] carlosd: tubbo, only add it to ActiveSupport::TimeZone::MAPPING doesn't make it be returned by ActiveSupport::TimeZone.all
[22:36:52] smathy: spellbook, every browser with your site open is making hitting a 3rd party API every 15 minutes? You've basically written a DDOS.
[22:37:15] carlosd: the value returned by this method is cached when the class is created
[22:37:33] carlosd: do you know anyway to force it to recompute?
[22:37:35] momomomomo_: has joined #RubyOnRails
[22:37:51] spellbook: smathy: i'm only running it on my local machine at the moment
[22:38:04] quazimodo: has joined #RubyOnRails
[22:39:15] smathy: spellbook, right, but you see my point right?
[22:40:23] NBarnes: has joined #RubyOnRails
[22:40:24] spellbook: smathy: yes. that's why i'm wondering if there's a best practice for this type of problem
[22:41:06] moeabdol: has joined #RubyOnRails
[22:41:53] smathy: spellbook, oh ok, I only saw you concerned with the key security, which is easily solved by just making your own server a proxy between the browsers and the 3rd party API. But if you're still triggering the 15 minute polling from JS on the client side then you're still going to create a huge, unnecessary, flood of polling.
[22:42:07] NBarnes: has joined #RubyOnRails
[22:42:32] smathy: spellbook, you need your server to trigger the polling and intervals and so forth so that you can ensure that you're only sending one every 15 minutes.
[22:44:35] spellbook: smathy: oh. i see. ok. that makes sense. thank you
[22:44:39] celly_: has joined #RubyOnRails
[22:48:12] drbayer: has joined #RubyOnRails
[22:48:36] quazimodo: has joined #RubyOnRails
[22:50:09] quazimod1: has joined #RubyOnRails
[22:51:20] sbarg1: has joined #RubyOnRails
[22:51:28] snowy: has joined #RubyOnRails
[22:51:38] aegis3121: has joined #RubyOnRails
[22:53:07] LateralOctober: has joined #RubyOnRails
[22:53:58] aloneintheworld: has joined #RubyOnRails
[22:54:07] peterevjan: has joined #RubyOnRails
[22:54:34] aloneintheworld: What is this code not creating guest users after an event creation? https://gist.github.com/anonymous/be6cfa6203af5042772d
[22:54:56] lemur: has joined #RubyOnRails
[22:57:46] jgt2: has joined #RubyOnRails
[22:58:10] rogue_koder: has joined #RubyOnRails
[22:59:02] wethu: has joined #RubyOnRails
[22:59:54] Intii: has joined #RubyOnRails
[23:00:15] Intii: How stable is Rails 5 to use right now?
[23:00:26] smathy: Intii, it's in beta 2
[23:00:47] smathy: aloneintheworld, is create_guest being called?
[23:00:58] Intii: smathy: So stay away?
[23:01:45] smathy: Intii, up to you :) But beta is beta.
[23:01:51] smathy: beta 2 is more stable than beta 1
[23:02:17] Intii: I want to use rails-api, but I'm concerned about the upgrade from rails 4 to 5 down the line. So thats why I'm wondering if I should just start with rails 5 right now
[23:03:15] rhizome: Intii: doesn't really matter
[23:03:18] shmilan: has joined #RubyOnRails
[23:03:22] smathy: aloneintheworld, and you're testing this in the rails console?
[23:03:23] user083: has joined #RubyOnRails
[23:03:27] Intii: rhizome: What do you mean?
[23:04:00] aloneintheworld: smathy: thorugh a test actually???
[23:04:13] rhizome: if you want to use 5, use 5, if you want or need to use 4, you can worry about upgrading later
[23:04:15] smathy: aloneintheworld, ok, in the rails console does it work properly?
[23:04:37] NBarnes: has joined #RubyOnRails
[23:04:45] smathy: ACTION votes rhizome to help Intii if any problems arise
[23:04:47] aloneintheworld: smathy: let me check
[23:05:03] rhizome: i guess if you're mostly worried about upgrading from 4 and not from putting 5 into production, a hobby might as well start with 5. up to you.
[23:05:26] Intii: It's not a hobby, it's something that is going to be used in a production environment
[23:05:54] rhizome: what makes you consider 5 for it, then?
[23:06:30] lubekpl: rhizome my PM :P
[23:06:30] Intii: the integration with rails api
[23:06:44] rhizome: you can always read up on changes in the pipeline and write your 4 code to be 5-friendly
[23:07:05] aloneintheworld: smathy: in the console it fails on validation saying that users is not valid, so I guess I???m missing some parameter to the user model. Why don???t I get this through testing ?
[23:08:04] blackmesa: has joined #RubyOnRails
[23:08:22] rhizome: Intii: i doubt it will be much more than removing that gem from your Gemfile
[23:08:43] smathy: aloneintheworld, did you use a ! method in your console?
[23:08:55] Intii: Hmm... okay. I guess we'll deal with that problem when we get ther
[23:09:03] Intii: Thanks rhizome and smathy!
[23:09:08] aloneintheworld: smathy: yes, as well in my test. @event.save!
[23:09:09] SteenJobs: has joined #RubyOnRails
[23:09:13] rhizome: Intii: what problem? the actual rails-api gem is what's being incorporated into rails 5
[23:09:32] smathy: aloneintheworld, I dunno, that's weird, I wouldn't have expected that exception to be swallowed.
[23:09:40] Intii: lmfaoo the problem of upgrading (i know its not really a "problem" per se, just didn't know what word to use)
[23:10:00] rhizome: it's not going to be hard
[23:10:02] smathy: Intii, you're welcome.
[23:10:21] waltz: has joined #RubyOnRails
[23:10:33] smathy: Biggest hassle with upgrading is just when other gems aren't compatible - which is a problem right now if you want to use beta2 anyway, so same-same.
[23:10:51] GeorgeJipa: has left #RubyOnRails: ("Leaving")
[23:11:03] meves: has joined #RubyOnRails
[23:11:06] mjc__: has joined #RubyOnRails
[23:12:06] NBarnes: has joined #RubyOnRails
[23:12:55] Pazician: has joined #RubyOnRails
[23:14:00] siaW: has joined #RubyOnRails
[23:15:21] superlou: has joined #RubyOnRails
[23:15:52] dm_24: is there a way to authorize a user under additional scopes, after they have already logged in with devise/omniauth?
[23:15:52] dm_24: for example, user logs in with regular google_oauth2 strategy/scope... but then later on they press a button in the site that 'upgrades' their account status to include the google drive scope, for example
[23:17:22] Intii: Should I have two seperate projects for my api and front-end (which is built using Ember)?
[23:17:58] KnownSyntax: has joined #RubyOnRails
[23:17:58] KnownSyntax: has joined #RubyOnRails
[23:19:28] SteenJobs: has joined #RubyOnRails
[23:20:00] meves: has joined #RubyOnRails
[23:20:26] NBarnes: has joined #RubyOnRails
[23:23:47] NBarnes: has joined #RubyOnRails
[23:24:17] one_zero: has joined #RubyOnRails
[23:25:27] mices: can i routes different url's to the same controller action
[23:26:04] NBarnes: has joined #RubyOnRails
[23:26:15] shmilan: has joined #RubyOnRails
[23:27:47] NBarnes: has joined #RubyOnRails
[23:30:52] Palsson: has joined #RubyOnRails
[23:34:01] Ropeney: has joined #RubyOnRails
[23:35:17] Palsson: has joined #RubyOnRails
[23:37:05] djbkd: has joined #RubyOnRails
[23:37:15] meves: has joined #RubyOnRails
[23:37:26] fwaokda: has joined #RubyOnRails
[23:37:42] NBarnes: has joined #RubyOnRails
[23:39:31] pwnd_nsfw: Email sent with my interview project
[23:39:35] pwnd_nsfw: ACTION has fingers crossed.
[23:40:22] pwnd_nsfw: mices, did you check the documentation?
[23:40:57] Intii: Goodluck pwned_nsfw!
[23:41:15] mices: pwnd_nsfw: turns out i'm not gonna have a bunch of different routes for likes#create and likes#destroy, just one route for each
[23:41:57] mices: i was gonna have different routes for whatever people are liking
[23:42:10] pwnd_nsfw: mices, did you check the documentation?
[23:45:38] pwnd_nsfw: thanks Intii!
[23:48:45] Palsson: has joined #RubyOnRails
[23:51:05] Palsson: has joined #RubyOnRails
[23:51:12] Denarii: has joined #RubyOnRails
[23:53:55] diegoviola: has joined #RubyOnRails
[23:54:02] peterevjan: has joined #RubyOnRails
[23:57:33] northfurr: has joined #RubyOnRails
[23:58:35] pwnd_nsfw: has joined #RubyOnRails
[23:59:44] Ducky-: has joined #RubyOnRails