« Back to channel list

#RubyOnRails - 19 February 2016

« Back 1 day Forward 1 day »
[00:01:01] one_zero: has joined #RubyOnRails
[00:01:09] adavia: still i am confuse why it let me render the partial but locals are not defined
[00:01:31] w0rd-driven: has joined #RubyOnRails
[00:01:46] hnanon: has joined #RubyOnRails
[00:02:05] Rodya_: has joined #RubyOnRails
[00:02:36] ur5us: has joined #RubyOnRails
[00:02:49] speaking1ode: has joined #RubyOnRails
[00:03:13] bronson: has joined #RubyOnRails
[00:03:36] codepete: has joined #RubyOnRails
[00:05:24] DanKnox_: has joined #RubyOnRails
[00:05:24] DanKnox: has joined #RubyOnRails
[00:05:52] _djbkd: has joined #RubyOnRails
[00:06:09] IceBear: has joined #RubyOnRails
[00:08:36] aloneintheworld: has joined #RubyOnRails
[00:08:46] dopamean1: has joined #RubyOnRails
[00:09:11] hnanon: How was your trip?
[00:09:17] Radar: Great, thanks.
[00:09:28] hnanon: I think sevenseacat said you were in Rome?
[00:09:33] Radar: Rome, Florence and Venice
[00:09:45] hnanon: For how long?
[00:09:49] Radar: Just a week
[00:10:00] Radar: Rome for a few days, Florence for a few more, then Venice
[00:10:00] hnanon: Oh, I though it was longer for some reason.
[00:11:13] askhat: has joined #RubyOnRails
[00:12:16] yfeldblum: has joined #RubyOnRails
[00:12:33] Radar: Nope, just a week :) It was very much fly-in and fly-out.
[00:12:57] korzybski: has joined #RubyOnRails
[00:13:01] howon: has joined #RubyOnRails
[00:13:28] howon: has left #RubyOnRails: ()
[00:13:46] hnanon: Is it a direct flight? I imagine it's at least 15 hours?
[00:14:10] maxsong1002: has joined #RubyOnRails
[00:14:29] maxsong1002: I am having trouble with Sidekiq. Anyone available to offer a quick help?
[00:14:40] Radar: hnanon: It's 14hrs to Dubai, then 6 more hours to Rome. It's almost 24 hours of travel.
[00:14:41] Radar: maxsong1002: !used
[00:14:41] helpa: maxsong1002: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[00:14:41] robbyoconnor: has joined #RubyOnRails
[00:14:49] Radar: brb, production issue
[00:15:27] theery: has joined #RubyOnRails
[00:16:27] maxsong1002: This is what I want to run as a bg job: http://pastebin.com/rbbf6TVV
[00:17:07] maxsong1002: And I call it like this: `ApplicantIdentity::ApplicantLinker.delay.link_applicants_to(resource.id)`
[00:17:53] maxsong1002: from the logs, I see `INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["handler", "--- !ruby/object:Delayed::PerformableMethod\nobject: !ruby/class 'Applicant::IdentityLinker'\nmethod_name: :link_applicant_identity_to`
[00:18:20] maxsong1002: But this never runs. Am I missing a step? (e.g. should I create a worker?)
[00:18:21] Ropeney: maxsong1002: all that should be in the pastebin
[00:19:07] zackzorman: has joined #RubyOnRails
[00:19:15] kies^: has joined #RubyOnRails
[00:19:27] _djbkd: has joined #RubyOnRails
[00:20:39] maxsong1002: A noob questions related to SideKiq: http://pastebin.com/PWYQhkrP
[00:21:24] Ropeney: maxsong1002, do you have sidekiq running?
[00:21:46] Papierkorb: maxsong1002: are you sure you're *using* sidekiq? Sidekiq uses Redis for jobs storage ..
[00:22:16] maxsong1002: I have both redis and sidekiq running
[00:22:19] maxsong1002: Other jobs run fine.
[00:22:46] Ropeney: maxsong1002: you can see it at localhost:3000/_sidekiq ?
[00:22:58] DLSteve: has joined #RubyOnRails
[00:23:26] maxsong1002: hm I can see the logs from the console
[00:23:49] s2013: has joined #RubyOnRails
[00:23:58] Radar: maxsong1002: delayed_jobs table but you're asking about sidekiq? This doesn't seem right.
[00:24:05] Radar: Papierkorb is on the right track
[00:24:52] Papierkorb: maxsong1002: you should never see such a INSERT. Sidekiq doesn't care about your RDBMS, you can't even configure it to do so.
[00:25:16] Ropeney: yeah, are you sure your not uising https://github.com/collectiveidea/delayed_job ?
[00:26:02] maxsong1002: we used it as a legacy before
[00:26:09] maxsong1002: give me a sec
[00:27:18] gheegh: has joined #RubyOnRails
[00:28:05] maxsong1002: do you have to be running rake:jobs?
[00:28:10] roshanavand: has joined #RubyOnRails
[00:28:11] Radar: that's delayed job
[00:28:11] maxsong1002: rake jobs:work
[00:28:14] Radar: that's delayed job.
[00:28:47] maxsong1002: so I should be just running sidekiq and redis right?
[00:28:54] Oliphaunte: has joined #RubyOnRails
[00:29:22] maxsong1002: `SomeClass.delay.someAction`
[00:29:43] maxsong1002: Is it possible that this is actually triggering delayed_job instead of Sidekiq?
[00:30:00] maxsong1002: how do I make sure Sidekiq does the job?
[00:30:09] maxsong1002: where it's not an option to remove delayed_job gem from the project
[00:30:29] _Tariq: has joined #RubyOnRails
[00:33:03] loc22: has joined #RubyOnRails
[00:34:20] Palsson: has joined #RubyOnRails
[00:34:25] _djbkd: has joined #RubyOnRails
[00:39:14] alex88: has joined #RubyOnRails
[00:39:36] Radar: You can't.
[00:39:37] Radar: delay is probably a method defined by one or both]
[00:39:38] Radar: You could make a Sidekiq worker which you would call explicitly.
[00:40:13] lemur: has joined #RubyOnRails
[00:40:44] Technodrome: has joined #RubyOnRails
[00:44:42] Deck`: has joined #RubyOnRails
[00:46:19] ur5us: has joined #RubyOnRails
[00:50:33] jfelchner: has joined #RubyOnRails
[00:52:27] triptec: has joined #RubyOnRails
[00:52:58] DanKnox: has joined #RubyOnRails
[00:52:59] DanKnox_: has joined #RubyOnRails
[00:58:04] Devalo: has joined #RubyOnRails
[00:58:23] sevenseacat: has joined #RubyOnRails
[01:01:35] Cervajz: has joined #RubyOnRails
[01:05:01] B1n4r10: has joined #RubyOnRails
[01:05:32] rakm: has joined #RubyOnRails
[01:06:13] mary5030: has joined #RubyOnRails
[01:06:30] Rodya_: has joined #RubyOnRails
[01:07:29] Cervajz_: has joined #RubyOnRails
[01:09:21] dstarh: has joined #RubyOnRails
[01:09:45] Rodya_: has joined #RubyOnRails
[01:12:35] robbyoconnor: has joined #RubyOnRails
[01:14:37] theery: has joined #RubyOnRails
[01:16:49] Pazician: has joined #RubyOnRails
[01:18:42] Dreamer3_: has joined #RubyOnRails
[01:19:37] kirillzh: has joined #RubyOnRails
[01:20:58] guacamole: has joined #RubyOnRails
[01:21:44] guacamole: has joined #RubyOnRails
[01:23:16] JoshGlzBrk: has joined #RubyOnRails
[01:24:11] mesimon: has joined #RubyOnRails
[01:24:44] Technodrome: has joined #RubyOnRails
[01:25:04] mesimon: has left #RubyOnRails: ()
[01:27:56] sleungcy: has joined #RubyOnRails
[01:28:02] chipotle: has joined #RubyOnRails
[01:29:01] Cervajz: has joined #RubyOnRails
[01:31:27] fernandomm: has joined #RubyOnRails
[01:31:29] triptec: has joined #RubyOnRails
[01:34:34] Cervajz: has joined #RubyOnRails
[01:35:21] decaff: has joined #RubyOnRails
[01:38:19] Oliphaunte: has joined #RubyOnRails
[01:38:45] KnownSyntax: has joined #RubyOnRails
[01:38:48] KnownSyntax: has joined #RubyOnRails
[01:39:07] sled: has joined #RubyOnRails
[01:42:25] astrofog: has joined #RubyOnRails
[01:44:16] sankaber: has joined #RubyOnRails
[01:46:44] Deck`: has joined #RubyOnRails
[01:48:08] allcentury: has joined #RubyOnRails
[01:50:03] Rodya_: has joined #RubyOnRails
[01:50:30] xardion: has joined #RubyOnRails
[01:50:49] nettoweb: has joined #RubyOnRails
[01:52:50] fernandomm: has joined #RubyOnRails
[01:53:02] sankaber: has joined #RubyOnRails
[01:55:04] s2013: has joined #RubyOnRails
[01:56:01] SteenJobs: has joined #RubyOnRails
[01:56:09] loc22: has joined #RubyOnRails
[01:57:16] godzillaenlacasa: anyone know if it's possible to update the ruby version on a server via rubber?
[01:57:18] droptone: Anyone here have experience with AngularDevise? I've got basic authentication working, I'm trying to find a working example of checking the home state to see if a user has successfully authentiated, and if so redirect them to a specific template based...
[01:57:33] droptone: on their user type, we're using STI with tables that inherit from the root User table
[01:57:50] droptone: We're converting a working Rails 4.2.x site to an SPA using Angular.
[01:58:53] theery: has joined #RubyOnRails
[01:59:00] droptone: Anyone here work with Angular and rails much?
[01:59:11] triptec: has joined #RubyOnRails
[01:59:31] IFrank00: has joined #RubyOnRails
[02:03:22] Oliphaunte: has joined #RubyOnRails
[02:06:40] droptone: Anyone here ever been to a Turkish prison?
[02:06:48] droptone: Anyone here like movies about gladiators?
[02:07:32] godzillaenlacasa: haha, i actually have been to a Tuekish prison
[02:07:33] theery_: has joined #RubyOnRails
[02:07:59] Terens: <%= f.text_field :partial_starting, value: params[:request][:partial_starting] %>
[02:08:11] Terens: how can I check array for non nil ?
[02:09:25] norc-2: has joined #RubyOnRails
[02:10:21] godzillaenlacasa: @Terens something like array.all? {|x| x.nil?}
[02:10:38] Terens: I mean params[:request]
[02:10:44] Terens: in order to set value
[02:11:11] godzillaenlacasa: not sure i understand then
[02:11:28] Terens: <%= f.text_field :partial_starting, value: params[:request][:partial_starting] %>
[02:11:34] drbayer: has joined #RubyOnRails
[02:11:42] Terens: this will fail if params[:request] is null
[02:12:06] allcentury: has joined #RubyOnRails
[02:12:43] northfurr: has joined #RubyOnRails
[02:13:14] robbyoconnor: has joined #RubyOnRails
[02:13:23] godzillaenlacasa: you passing to a controller?
[02:14:46] nfk: has joined #RubyOnRails
[02:14:49] triptec: has joined #RubyOnRails
[02:15:08] droptone: Yeah, if passing to a controller it's as simple as if params[:request].nil?
[02:15:15] arBmind: has joined #RubyOnRails
[02:15:22] droptone: I suppose you could do the same in a view
[02:16:14] _Tariq: has joined #RubyOnRails
[02:16:37] Terens: I should have worked automaticcaly
[02:16:40] Terens: but it doesnt
[02:16:45] droptone: What do you mean?
[02:16:52] Terens: <%= f.text_field 'partial_starting' %> this should be enough
[02:16:56] northfurr: anyone ever set up ssl on heroku? my custom domain is redirecting to the heroku domain instead of vice versa D:
[02:17:01] sled: I'm building a simple authentication system at the moment and wondering what's the benefit of implementing it at the Rack level (like Warden does) versus implementing it at the ApplicationController level
[02:17:05] fernandomm: has joined #RubyOnRails
[02:17:11] Terens: but it doesnt work
[02:17:28] Terens: after posting the form it gets empty although value exists in param and model
[02:17:29] superlou: has joined #RubyOnRails
[02:17:34] droptone: well you can monitor the development logs to see what's actually being passed
[02:17:36] Terens: its a virtual
[02:17:38] droptone: I've had to do that several times
[02:17:43] droptone: for various reasons
[02:18:45] droptone: When I use form helpers that aren't form_for often the model name will be prepended to the params
[02:18:58] droptone: LIke when you actually analyze it it'll be params[:profile][:first_name]
[02:19:24] droptone: That doesn't seem to happen with integrated form helpers like form_for or simple_form_for
[02:20:09] droptone: Test execute your form and tail -f log/development.log
[02:20:14] droptone: and watch how the params are actually passed
[02:20:41] Terens: I added a raise
[02:20:58] droptone: Have you watched your development log to see what's actually happening?
[02:21:00] Terens: where should i watch
[02:21:02] droptone: How the params actually look?
[02:21:05] droptone: log/development.log
[02:21:09] droptone: tail -f log/development.log
[02:21:13] northfurr: just figured it out…. I was setting the host name using a config var...
[02:21:20] droptone: then input some data on your form and watch how the params are actually structured when passed
[02:21:53] droptone: That's the trick
[02:22:01] droptone: I've had that happen a lot with non-integrated form helpers
[02:22:12] droptone: Unexpected param structure that breaks my controller logic for analyzing them
[02:23:23] Terens: Actually it is a virtual attribute within model
[02:23:28] Terens: and that is causeing the trouble
[02:24:32] triangles: has joined #RubyOnRails
[02:24:34] Terens: params seems ok
[02:25:26] mary5030: has joined #RubyOnRails
[02:27:23] bronson: has joined #RubyOnRails
[02:28:34] Devalo: has joined #RubyOnRails
[02:30:07] dexter_: has joined #RubyOnRails
[02:37:08] IFrank00: has joined #RubyOnRails
[02:41:01] baweaver: has joined #RubyOnRails
[02:41:08] dopamean_: has joined #RubyOnRails
[02:42:30] drbayer: has joined #RubyOnRails
[02:47:33] Deck`: has joined #RubyOnRails
[02:49:51] drbayer: has joined #RubyOnRails
[02:51:40] triptec: has joined #RubyOnRails
[02:53:02] arup_r: has joined #RubyOnRails
[02:53:28] HalcyonicStorm: has joined #RubyOnRails
[02:56:32] Oliphaunte: has joined #RubyOnRails
[02:58:43] p1k: has joined #RubyOnRails
[03:03:39] creature: has joined #RubyOnRails
[03:03:39] creature: has joined #RubyOnRails
[03:04:15] sankaber: has joined #RubyOnRails
[03:05:44] qejk: has joined #RubyOnRails
[03:07:17] triptec: has joined #RubyOnRails
[03:09:10] robbyoconnor: has joined #RubyOnRails
[03:13:20] Oliphaunte: has joined #RubyOnRails
[03:16:49] DLSteve: has joined #RubyOnRails
[03:17:50] Pazician: has joined #RubyOnRails
[03:23:35] Maletor: has joined #RubyOnRails
[03:26:10] bronson: has joined #RubyOnRails
[03:27:58] JoshGlzBrk: has joined #RubyOnRails
[03:29:42] DmitryBochkarev: has joined #RubyOnRails
[03:31:51] triptec: has joined #RubyOnRails
[03:33:25] qejk_: has joined #RubyOnRails
[03:33:44] enitiz: has joined #RubyOnRails
[03:40:09] DEA7TH: has joined #RubyOnRails
[03:40:12] peterevjan: has joined #RubyOnRails
[03:43:16] baweaver: has joined #RubyOnRails
[03:43:59] arup_r: has joined #RubyOnRails
[03:45:17] kies^: has joined #RubyOnRails
[03:47:26] triptec: has joined #RubyOnRails
[03:48:18] Deck`: has joined #RubyOnRails
[03:56:55] baweaver: has joined #RubyOnRails
[03:59:12] Devalo: has joined #RubyOnRails
[03:59:43] ferr: has joined #RubyOnRails
[04:01:21] yellow5: has joined #RubyOnRails
[04:01:25] droptone: There he is!
[04:02:11] shtirlic: has joined #RubyOnRails
[04:02:20] jfelchner: has joined #RubyOnRails
[04:02:35] peterevjan: has joined #RubyOnRails
[04:02:51] s2013: has joined #RubyOnRails
[04:04:04] DEA7TH: How can I extract a reusable component from my application (ideally publish as a gem), if it uses a DB table and has views? I don't want people to be stuck with my exact tables / views.
[04:04:41] DEA7TH: But writing generators which simply place my code in your code doesn't sound right either.
[04:05:24] yellow5: DEA7TH: have you considered rails engines?
[04:05:41] DEA7TH: yellow5: will look it up
[04:05:57] chouhoulis: has joined #RubyOnRails
[04:06:06] Oliphaunte: has joined #RubyOnRails
[04:06:37] DEA7TH: sounds awesome! :)
[04:07:24] Eswar: has joined #RubyOnRails
[04:08:13] yellow5: DEA7TH: great, hope that helps you
[04:09:59] triptec: has joined #RubyOnRails
[04:11:31] K_r3aPeR: has joined #RubyOnRails
[04:12:53] emachnic: has joined #RubyOnRails
[04:13:15] braincrash: has joined #RubyOnRails
[04:15:14] krz: has joined #RubyOnRails
[04:15:51] tildes: has joined #RubyOnRails
[04:18:03] Technodrome: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[04:20:21] strongcode: is there any way to leverage the Rails event loop to run scheduled tasks? I want to have recurring tasks at set intervals, but i'm using Heroku and dont want to rely on their scheduler/psuedo-cron thing
[04:23:40] DEA7TH: strass|away: Whenever? https://github.com/javan/whenever
[04:23:47] DEA7TH: haven't used it myself yet though
[04:25:06] DEA7TH: strongcode: that was supposed to be for you ^
[04:25:39] DEA7TH: str - a very common nickname prefix for a prefix of that length :D
[04:25:41] strongcode: whenever uses cron
[04:25:59] crankharder: any ideas why factory girl wouldn't persist records immediately after creating them? https://gist.github.com/crankharder/2069735957af3d070be3
[04:26:04] strongcode: unfortunately
[04:27:39] kdough: has joined #RubyOnRails
[04:28:19] rogue_koder: has joined #RubyOnRails
[04:29:26] arup_r1: has joined #RubyOnRails
[04:31:58] skyjumper: question about best practices...
[04:32:07] skyjumper: is there a better way to do `before_create :something, if: :valid?`
[04:33:33] rogue_koder: has joined #RubyOnRails
[04:35:52] _Tariq: has joined #RubyOnRails
[04:36:23] krz: has joined #RubyOnRails
[04:37:54] DanKnox: has joined #RubyOnRails
[04:38:45] sami: has joined #RubyOnRails
[04:39:11] DmitryBochkarev: has joined #RubyOnRails
[04:40:44] kirillzh: has joined #RubyOnRails
[04:42:01] kirillzh: has joined #RubyOnRails
[04:43:00] Oliphaunte: has joined #RubyOnRails
[04:44:05] Helheim: has joined #RubyOnRails
[04:44:25] rubyonrailed: has joined #RubyOnRails
[04:48:54] Dreamer3_: has joined #RubyOnRails
[04:49:06] Deck`: has joined #RubyOnRails
[04:50:50] triptec: has joined #RubyOnRails
[04:51:00] ferr: How would I handle validation error messages if I am using a partial?
[04:55:20] sami: has joined #RubyOnRails
[04:58:18] treaki: has joined #RubyOnRails
[05:00:45] arup_r: ferr: You can do. You have the actual object stored inside a instance variable, and that you can use
[05:01:14] ferr: arup_r: could you please explain this in more detail?
[05:03:05] ferr: That is my code: https://gist.github.com/Fercell/ccd674d1b545838c485e
[05:03:39] DEA7TH: Does Spree or anything else offer support for keeping track of expenses (one-time and periodic e.g. weekly) - CRUD and then list expenses for a period of time? Just curious.
[05:03:45] arup_r: say you have something like @teacher = Teacher.new(teacher_params) inside the create action. Now, when you did if @teacher.vaild? ; #some code ; else ; render :new end .. Now, inside the new partial you have access the object through the instance var @teacher. And from that views whatever partials you rendered, also has access to the same object through @teacher
[05:04:07] apotry: has joined #RubyOnRails
[05:04:21] arup_r: now if you do @teacher.errors.each do | error | ... end inside the view or partial, you can show those error messages
[05:04:37] DEA7TH: accounting*
[05:04:43] ferr: Oh, so I did it wrong
[05:04:58] ferr: Cause I created separate actions for order_program order_procedure order_bath instead of new
[05:07:35] czerasz: has joined #RubyOnRails
[05:07:56] arup_r: DEA7TH: you can query the DB and get the data out right ?
[05:08:28] sami: has joined #RubyOnRails
[05:08:36] DEA7TH: arup_r: how do you mean, for expenses?
[05:09:21] arup_r: what do you mean by expenses before me to say you what I meant ?
[05:11:01] DEA7TH: it's for a company - they need to keep track of their income. Expenses are things like gas prices (since they offer deliveries), employee wages and so on.
[05:11:08] DEA7TH: rent also
[05:11:58] arup_r: ok Spree is for something else.. not the what you are looking for..
[05:12:23] DEA7TH: yeah I'm surprised it doesn't also include that as an option
[05:12:36] arup_r: DEA7TH: don't use gem, you can build your own app to do it.. I see a great scope to build a new app to meet your need..
[05:13:09] arup_r: DEA7TH: build your app, and then mount it as a engine to your another project or others when you need it.. ?
[05:13:19] DEA7TH: I'm asking because I already did it for my app (should've looked for a gem for it, oh well) and am now wondering if I can make that as a gem
[05:13:37] arup_r: DEA7TH: Engine, not a gem.
[05:13:47] arup_r: I mean.. yeah you are true..
[05:14:06] arup_r: you can make your gem as engine to port or mount in a Rails app
[05:18:11] patrick99e99: has joined #RubyOnRails
[05:18:36] Pazician: has joined #RubyOnRails
[05:18:52] patrick99e99: how do you do parameterization with postgres and activerecord? if I do ActiveRecord::Base.connection.execute('update "foo" set "name"=$1') .. how do I populate $1 ?
[05:21:57] Eswar: has joined #RubyOnRails
[05:25:35] rhizome: ('statement', param1, p2, p3)
[05:25:40] yfeldblum: has joined #RubyOnRails
[05:26:02] arup_r: has joined #RubyOnRails
[05:29:27] chipotle: has joined #RubyOnRails
[05:29:46] Devalo: has joined #RubyOnRails
[05:29:50] triptec: has joined #RubyOnRails
[05:38:35] n1lo: has joined #RubyOnRails
[05:39:04] rvanlieshout: has joined #RubyOnRails
[05:39:40] smathy: has joined #RubyOnRails
[05:40:15] Eswar: has joined #RubyOnRails
[05:40:53] chipotle: has joined #RubyOnRails
[05:42:40] havenwood: rvanlieshout: g'morn
[05:43:40] K_r3aPeR_: has joined #RubyOnRails
[05:45:51] rogue_koder: has joined #RubyOnRails
[05:46:55] arup_r1: has joined #RubyOnRails
[05:47:39] robbyoconnor: has joined #RubyOnRails
[05:48:46] aloneintheworld: has joined #RubyOnRails
[05:49:21] bronson: has joined #RubyOnRails
[05:50:08] Deck`: has joined #RubyOnRails
[05:51:34] itsgokul: has joined #RubyOnRails
[05:52:47] sevenseacat: has joined #RubyOnRails
[05:53:52] chipotle: has joined #RubyOnRails
[06:05:36] chipotle: has joined #RubyOnRails
[06:10:43] patrick99e99: rhizome: that's not right...
[06:11:06] patrick99e99: rhizome: I get "PG::UndefinedParameter: ERROR: there is no parameter $1"
[06:11:31] patrick99e99: and if I pass in multiple parameters, I get ArgumentError: wrong number of arguments (3 for 1..2)
[06:12:14] Devalo: has joined #RubyOnRails
[06:13:52] Diaoer: has joined #RubyOnRails
[06:16:40] yardenbar: has joined #RubyOnRails
[06:18:05] srinidhi: has joined #RubyOnRails
[06:18:06] patrick99e99: and I dont get it at all because PG's connection instance has an exec_params mmethod
[06:18:18] patrick99e99: but I cant use it because the dumb activerecord adapter doesn't expose the connection object
[06:21:16] bronson: has joined #RubyOnRails
[06:21:36] mattp__: has joined #RubyOnRails
[06:22:32] sled: has joined #RubyOnRails
[06:23:17] rvanlieshout: patrick99e99: Model.connection ?
[06:23:51] patrick99e99: rvanlieshout: no.. that gives ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
[06:23:56] patrick99e99: its not the real PG::Connection instance
[06:25:09] rvanlieshout: .instance_variable_get(&:connection)
[06:26:54] mwlang: has joined #RubyOnRails
[06:27:55] mwlang: has anyone written a gem or set of rake tasks to make it easy to extract data from production/development DB to a FactoryGirl fixture?
[06:30:09] rvanlieshout: that should be :&, but it's not really the way to go i guess
[06:30:43] p1k: has joined #RubyOnRails
[06:31:42] alphaatom: has joined #RubyOnRails
[06:32:53] sandstrom: has joined #RubyOnRails
[06:33:27] baweaver: https://github.com/baweaver/mockingjay - I was screwing around with something like it
[06:33:36] crdpink: has joined #RubyOnRails
[06:33:58] baweaver: https://github.com/baweaver/valor - that falls in some of the same vein as well
[06:34:08] baweaver: nothing to straight rip data to factories yet though
[06:34:16] baweaver: I've thought about it, but not much reason to
[06:36:17] triptec: has joined #RubyOnRails
[06:36:56] mwlang: I completely rewrote a Rails 1 app in Rails 4 to process SOAP messages in both directions. Trying to make it easier to capture known incorrect responses by the new server, which involves not only snapping the SOAP message that was incorrectly handled, but the data that would be used to generate the correct outgoing SOAP message.
[06:37:32] ur5us: has joined #RubyOnRails
[06:37:58] mwlang: just getting tired of editing those SOAP messages to all but match existing fixtures (with the one or two things changed that led to the failure)
[06:39:16] arup_r: has joined #RubyOnRails
[06:39:59] AnoHito: has joined #RubyOnRails
[06:41:18] rvanlieshout: mwlang: use something like vcr to record it
[06:41:45] Deck`: has joined #RubyOnRails
[06:42:42] mwlang: I’m auto-capturing all the SOAP exchanges…the flipside of the coin is extracting all the data that goes into replicating that SOAP message.
[06:42:59] arup_r: n00b question. Why the plan to store data in Factories, but not to export as a CSV .. ?
[06:44:37] mwlang: arup_r: easier to mess with and readability. :-)
[06:45:25] arup_r: I knew fixtures are to have some sample data for test ..
[06:45:54] mwlang: but I’m also thinking of some upcoming projects this year…I have at least 5 more projects on my plate to rewrite that have databases…it would be cool to just capture 1 or 2 records as initial fixtures to jumpstart the test authoring.
[06:46:24] oliver__: has joined #RubyOnRails
[06:46:55] arup_r: mwlang: good, you have too many work soon! ..
[06:47:15] arup_r: Well.. getting a CSV and then produce YAML from CSV ?
[06:47:33] arup_r: yeah, too much work. But ofcourse one time activity..
[06:47:44] mwlang: haha…I have too much now.
[06:48:03] arup_r: I know. I remember your website still..
[06:49:50] arup_r: Databases have nice UI or tool to export data fast. And then Ruby to parse those file, and produce yaml.. my slowest ideas hehehe
[06:49:59] dopie: Ok I got an awesome question :)
[06:50:03] dopie: like most of my questions are
[06:50:21] mwlang: arup_r: yeah. I should give that angle some thought.
[06:50:40] arup_r: dopie: ask ask ask.....
[06:50:47] mwlang: I’ll most likely wait until the next project starts up and then solve it.
[06:50:52] arup_r: mwlang: good :)
[06:52:39] ur5us: has joined #RubyOnRails
[06:53:51] Jet4Fire: has joined #RubyOnRails
[07:01:24] htmldrum: has joined #RubyOnRails
[07:03:27] roshanavand: has joined #RubyOnRails
[07:03:44] solars: has joined #RubyOnRails
[07:09:11] mices: im trying to use acts_as_friendable, the docs say to run `rails g acts_as_friendable:install` after bundle install but rails doesn't recognize this generator
[07:10:16] roshanavand: has joined #RubyOnRails
[07:10:30] sevenseacat: why do you insist on using woefully old gems
[07:11:08] flappynerd: rails is quite an old gem by now, isn't it? :)
[07:12:12] sevenseacat: well it's been touched in the last three years
[07:12:17] sevenseacat: acts_as_friendable hasnt
[07:12:38] barhum2013: has joined #RubyOnRails
[07:12:43] rhizome: "build failing" i wonder what that means
[07:13:08] mices: sevenseacat: can you recommend a newer gem?
[07:13:41] sevenseacat: obsolete versions of ruby and rails... check
[07:14:00] sevenseacat: mices: write it yourself? :)
[07:14:12] mices: yea i already read how
[07:14:19] patrick99e99: does anyone know how to get the oid type of a column in activerecord? (postgres)
[07:14:31] sevenseacat: mices: you're most of the way there then
[07:14:32] mices: did it turn out that nobody needs friendable gems?
[07:14:41] rubyonrails322: has joined #RubyOnRails
[07:15:18] mices: i must be addicted to gems
[07:15:30] flappynerd: patrick99e99, don't use OIDs
[07:15:48] flappynerd: mices, yes that's a likely possibility
[07:15:54] flappynerd: many people are addicted to gems
[07:16:04] flappynerd: gems are not always a good solution to your issues
[07:16:20] flappynerd: said another way: just because a gem exists doesn't mean you should use it
[07:16:25] patrick99e99: flappynerd: i am trying to use PG:Connection exec_params which requires you to tell it the type of the parameter you are passing in.. since this is dynamic, it needs to be based off of the column... so please tell me how else I am suposed to do that? http://www.rubydoc.info/gems/pg/PG/Connection:exec_params
[07:16:25] jahbrewski: has joined #RubyOnRails
[07:17:16] woo: has joined #RubyOnRails
[07:17:52] arup_r: patrick99e99: what is the reason to run those RAW sql ?
[07:18:00] arup_r: I m curious ..
[07:18:04] patrick99e99: a good one... mass update
[07:18:09] sevenseacat: I've worked on projects that have dependency graphs of like 300 gems
[07:19:10] arup_r: patrick99e99: you can do mass update using AR methods too
[07:19:12] Pazician: has joined #RubyOnRails
[07:19:16] patrick99e99: arup_r: no you can't
[07:19:20] bronson: yup. then you really dread the day you're forced to run `bundle update`
[07:19:28] sevenseacat: bronson: no, you just never run it
[07:19:30] arup_r: like what you are updating ?
[07:19:32] patrick99e99: arup_r: mass update different values, different columns, multiple records
[07:19:39] SkepBrain: has joined #RubyOnRails
[07:19:46] mhoungbo: has joined #RubyOnRails
[07:19:55] bronson: sevenseacat: "eh, probably no one will notice the vulnerability..."
[07:20:01] arup_r: show me one UPDATE statement, that is doing
[07:20:09] arup_r: from your code.
[07:20:15] patrick99e99: arup_r: sorry? what?
[07:20:20] patrick99e99: you want to see the sql I am generating?
[07:20:53] arup_r: I would like to see the SQL that will do your mass update, that you are passing to the exec method.. just a sample
[07:21:00] arup_r: but not fake, the actual code
[07:22:42] patrick99e99: but not fake?
[07:23:02] patrick99e99: I will give you a sample of what how I am using exec_params
[07:23:04] arup_r: like foo, bar code..
[07:23:05] patrick99e99: pg_connection.exec_params('with n as (select unnest($1) as id, unnest($2) as col1, unnest($2) as col2) update table set col1 = n.col1, col2=n.col2 from n where table.id = n.id', [[1,2,3], ["foo", "bar", NULL], ["abc", "def", "omg"]]);
[07:23:16] patrick99e99: but there is plenty of foo bar in there.
[07:23:51] patrick99e99: not to mention $2 in there twice
[07:24:25] arup_r: hmm, now make sense. if you say only MAss update is not possible with Rails, I would disagree you.. But current code makes sense why you need those exec_* methods.
[07:24:50] patrick99e99: so.. can you help me out with how I can get the right types to exec_params?
[07:25:02] arup_r: always talk with your code at hand, so that we don't misunderstand you..
[07:25:29] patrick99e99: i was hoping to just do [{:value => 'hello', :type => Model.column_hash['col1'].type }] or something...
[07:25:38] patrick99e99: but, I am struggling with how to get that.........
[07:27:51] arup_r: patrick99e99: one good idea, check the out the test rails people wrote for the method you are at now. If you see any samples of test matches exactly what you need, there is a way. But otherwise now. I check like this when I am in dark.
[07:28:10] arup_r: otherwise not*
[07:28:47] roshanavand: has joined #RubyOnRails
[07:29:29] Pazician: has joined #RubyOnRails
[07:30:09] flappynerd: patrick99e99, https://cbabhusal.wordpress.com/2015/01/03/updating-multiple-records-at-the-same-time-rails-activerecord/
[07:31:17] patrick99e99: that's an actual thing in active record?????????????????????????????????????
[07:31:32] flappynerd: google is hard
[07:31:39] patrick99e99: what the fuck
[07:31:45] patrick99e99: why is that on a goddamn wordpress blog and not in the docs?!?!
[07:32:02] rvanlieshout: it's in the docs...
[07:32:19] rvanlieshout: there even is a link to it from that wordpress blog
[07:32:20] patrick99e99: rvanlieshout: well I only spent like hours today googling bulk update rails active record, etc
[07:32:23] patrick99e99: and could not find anything
[07:32:34] patrick99e99: except an active-import gem which doesnt do updating
[07:32:34] flappynerd: I think that was the second result on google
[07:33:03] patrick99e99: rvanlieshout: the link is to find_in_batches.. doesnt say anything about updates
[07:33:24] rvanlieshout: fair point. noticed that after clicking that link
[07:33:31] rvanlieshout: http://api.rubyonrails.org/classes/ActiveRecord/Relation.html#method-i-update_all
[07:33:56] patrick99e99: dude.. update_all is for a single value for multiple records
[07:34:02] patrick99e99: not multiple columns, multiple values
[07:34:17] ur5us: has joined #RubyOnRails
[07:34:18] patrick99e99: i see update above that
[07:34:19] patrick99e99: arrrrrrrrrrrrrrrrrrrrrrrrrrgh
[07:34:21] patrick99e99: i am going to scream
[07:34:25] rvanlieshout: then just update
[07:34:32] flappynerd: upset patrick99e99 is upset
[07:34:38] rvanlieshout: http://api.rubyonrails.org/classes/ActiveRecord/Relation.html#method-i-update
[07:35:21] flappynerd: patrick99e99, it's the difference between the class method and the instance method
[07:35:44] patrick99e99: well nothing like wasting your entire day
[07:35:51] AntiSpamMeta: has joined #RubyOnRails
[07:36:04] arup_r: flappynerd: there is really nothing called class method in Ruby. all are instance methods only..:)
[07:36:06] flappynerd: patrick99e99, well, one thing is probably certain, you won't likely forget this :)
[07:36:39] flappynerd: arup_r, it's a minor distinction, there's still a difference
[07:36:48] flappynerd: similar to static methods in C#/Java etc
[07:37:19] flappynerd: you're not allowed to reference instance methods from self.foo methods for example
[07:37:37] mark1: has joined #RubyOnRails
[07:37:37] arup_r: nah, here all are instance methods..
[07:37:42] rvanlieshout: that's similar to any language that uses objects
[07:38:09] flappynerd: except javascript basically
[07:38:23] flappynerd: but then again js is not class based
[07:38:25] rvanlieshout: then it's about function vs method
[07:40:04] flappynerd: I'm not sure what you mean by that
[07:40:13] flappynerd: method is just a name for a function that's a member of an object/class
[07:40:18] flappynerd: they're all functions
[07:40:33] rvanlieshout: but related to an object
[07:40:36] rvanlieshout: that is quite a difference
[07:41:08] flappynerd: but I'm talking about the difference between methods that operate without an instance and those that operate upon an instance
[07:41:18] flappynerd: I don't see what's controversial about that
[07:41:18] rvanlieshout: class or instance methods
[07:41:45] patrick99e99: hrm.. well it still seems like that method is not as good.. it still does N queries
[07:41:50] lubekpl: has joined #RubyOnRails
[07:41:51] patrick99e99: where as what I did was a single query
[07:42:06] rvanlieshout: patrick99e99: update_all
[07:42:12] rvanlieshout: also supports multiple attributes
[07:42:29] patrick99e99: rvanlieshout: please show me an example
[07:42:49] patrick99e99: multiple attributes, multiple values for specific records
[07:43:06] rvanlieshout: Foo.where(id: [1,2,3]).update_all baz: :bar, something_else: 4
[07:43:28] [dmp]: has joined #RubyOnRails
[07:43:45] patrick99e99: rvanlieshout: that will make 1,2,3 all have those values
[07:43:57] darutoko: has joined #RubyOnRails
[07:43:58] patrick99e99: the point is, 1 should have 'foo', 2 should have 'bar', 3 should have 'quux'
[07:44:12] rvanlieshout: and how would that be one query? with a case?
[07:44:16] patrick99e99: a single update call for multiple records, with distinct values..
[07:44:21] patrick99e99: like the example I pasted earlier
[07:44:25] patrick99e99: pg_connection.exec_params('with n as (select unnest($1) as id, unnest($2) as col1, unnest($2) as col2) update table set col1 = n.col1, col2=n.col2 from n where table.id = n.id', [[1,2,3], ["foo", "bar", NULL], ["abc", "def", "omg"]]);
[07:44:47] rvanlieshout: Foo.execute 'query'
[07:44:59] patrick99e99: ugh i feel like no one is listening to me...
[07:45:05] rvanlieshout: there is no sane way to do that
[07:45:17] rvanlieshout: i would certainly hope activerecord doesn't support it
[07:45:34] patrick99e99: ok.. thanks everyone.. have a great night
[07:46:07] flappynerd: update + select is perfectly sane
[07:46:26] rvanlieshout: sane way in having activerecord support that. cause it's really a db specific approach
[07:46:51] flappynerd: this is yet another reason I don't like ORMs
[07:47:21] flappynerd: choosing a specific RDBMS is good, the idea that I can freely hop from mysql to postgres to sqlite at anytime is a faulty one
[07:47:21] rvanlieshout: it's a really really tiny con over all pro's
[07:47:31] rvanlieshout: cause it doesn't restrict you from using db specific things
[07:47:46] rvanlieshout: it's also really really easy to create a custom method for it
[07:47:50] flappynerd: sure, you just have to drop to more or less raw queries sometimes
[07:48:51] rvanlieshout: with all helpers available to prevent sql injection
[07:50:23] flappynerd: helpers to prevent sql injection are neither ORM specific nor something that intrinsically identifies an orm
[07:50:38] rvanlieshout: they are orm specific
[07:50:38] flappynerd: good old mysql_escape_string() from PHP comes to mind for example
[07:50:50] rvanlieshout: which is useless for an mssql database
[07:51:38] flappynerd: and it's not valuable to be able to switch databases, choose a db that meets requirements for good reasons
[07:51:58] rvanlieshout: mssql just has a different way of escaping
[07:51:58] flappynerd: and there's typically only one good answer, which is postgres
[07:52:14] rvanlieshout: you shouldn't be using mysql_escape_string for a postgres db either
[07:53:32] flappynerd: and it wouldn't or won't matter because you won't need to switch DBs if you choose a sane one that meets requirements
[07:53:44] rvanlieshout: it might do now, but it might not do so in the future
[07:53:51] srinidhi: has joined #RubyOnRails
[07:54:00] flappynerd: doubtful with postgres
[07:54:03] sandstrom: has joined #RubyOnRails
[07:55:31] patrick99e99: which means it wants an integer to represent text or integer
[07:55:41] chrissonar: has joined #RubyOnRails
[07:55:53] rvanlieshout: doubtful, but still a strong assumption
[07:56:03] xuex: has joined #RubyOnRails
[07:56:12] chrissonar: do you know any pre packaged (with Gems set up like RSpec, Devise ...) Ruby on Rails distributions?
[07:56:17] flappynerd: not really, if you end up in that position, you've got generally far bigger problems
[07:56:32] flappynerd: and the reason you would switch is almost certainly because of a feature that, also, is not supported by AR
[07:56:32] rvanlieshout: i just use the postgres escape methods when using a postgres database
[07:56:36] rvanlieshout: and mysql methods for mysql databases
[07:56:52] rvanlieshout: so the ar provides orm wrapped escape methods
[07:57:00] bruce_lee: has joined #RubyOnRails
[07:57:27] bruce_lee: has joined #RubyOnRails
[08:00:43] tvw: has joined #RubyOnRails
[08:02:34] aloneintheworld: has joined #RubyOnRails
[08:03:16] xuex: has left #RubyOnRails: ()
[08:04:16] comrad: has joined #RubyOnRails
[08:05:59] xuex: has joined #RubyOnRails
[08:06:45] flappynerd: rvanlieshout, but that has nothing to do with the object relational mapping
[08:06:51] flappynerd: you could have that without object relational mapping
[08:07:17] _Diaoer: has joined #RubyOnRails
[08:07:24] rvanlieshout: and that's not possible because?
[08:07:31] pyemkey: has joined #RubyOnRails
[08:07:41] flappynerd: what did I say was impossible
[08:07:51] ferr: My mailers work through rails console, but in production I get ArgumentError (An SMTP To address is required to send a message. Set the message smtp_envelope_to, to, cc, or bcc address.)
[08:08:25] kitsuneyo: has joined #RubyOnRails
[08:08:58] aganov: has joined #RubyOnRails
[08:10:24] xuex: has left #RubyOnRails: ()
[08:11:29] rhizome: here we are
[08:12:01] dopie: https://gist.github.com/staycreativedesign/f252409960a7d007a452
[08:12:22] xuex: has joined #RubyOnRails
[08:12:23] dopie: how can i make :foo into where i can call self.foo.is_approved?
[08:14:44] rhizome: what is foo
[08:16:41] dopie: like what do you mean what is it
[08:17:06] Dbugger: has joined #RubyOnRails
[08:17:15] flappynerd: dopie, he means we need more information to help you with your question
[08:17:32] rhizome: i mean like is it an associated object, or an attribute or method or
[08:17:33] flappynerd: I could think of several other things you could describe
[08:18:07] jahbrewski: has joined #RubyOnRails
[08:19:00] dopie: its an associated object
[08:19:17] artto: has joined #RubyOnRails
[08:19:18] Devalo: has joined #RubyOnRails
[08:19:46] s2013: has joined #RubyOnRails
[08:20:45] dopie: or an attribute )
[08:25:02] solars: hi, can anyone give me a hint why I'm getting LoadError: Unable to autoload constant CurrencyConverter, expected /home/solars/.workspace/cpc/lib/currency_converter.rb to define it - although the file specifies that class?
[08:25:57] solars: I'm calling it from a model
[08:27:19] htmldrum: has joined #RubyOnRails
[08:29:36] Palsson: has joined #RubyOnRails
[08:30:40] chipotle: has joined #RubyOnRails
[08:33:36] rhizome: that file exists?
[08:34:42] mdw: has joined #RubyOnRails
[08:36:18] dopie: rhizome: when i do user.foo it returns an object
[08:38:21] rhizome: so then you'd have a boolean :approved
[08:39:38] dopie: or in my case
[08:39:41] dopie: is_approved
[08:39:53] helpa: Please do not use fake values, as they can be confusing or misleading. Sometimes both.
[08:40:17] Dbugger: Hello fellas
[08:40:21] Dbugger: How is everyone
[08:41:10] baweaver: has joined #RubyOnRails
[08:41:59] kmckelvi1: has joined #RubyOnRails
[08:45:34] Palsson_: has joined #RubyOnRails
[08:45:44] norc_: has joined #RubyOnRails
[08:46:14] artto_: has joined #RubyOnRails
[08:48:04] Eswar1: has joined #RubyOnRails
[08:48:34] gingray: has joined #RubyOnRails
[08:48:34] rhizome: dopie: should just work, then
[08:48:53] rafaelfranca: has joined #RubyOnRails
[08:50:28] htmldrum: has joined #RubyOnRails
[08:51:29] DEA7TH_: has joined #RubyOnRails
[08:53:25] woo: has joined #RubyOnRails
[08:53:36] franzip: has joined #RubyOnRails
[08:59:47] ur5us: has joined #RubyOnRails
[09:01:42] Dbugger: has joined #RubyOnRails
[09:03:54] hekin: has joined #RubyOnRails
[09:04:21] hekin: Hi folks, i’d like to the best practice to share/sync models between different repos
[09:04:34] czerasz: has joined #RubyOnRails
[09:06:43] quazimodo: has joined #RubyOnRails
[09:07:34] sevenseacat: has joined #RubyOnRails
[09:09:38] ur5us: has joined #RubyOnRails
[09:10:03] lucaspinto: has joined #RubyOnRails
[09:12:00] arup_r: has joined #RubyOnRails
[09:16:31] matthias_: has joined #RubyOnRails
[09:19:56] sevenseacat: has joined #RubyOnRails
[09:23:35] sled: has joined #RubyOnRails
[09:24:27] woo: has joined #RubyOnRails
[09:25:28] arBmind: has joined #RubyOnRails
[09:26:20] pavan__: has joined #RubyOnRails
[09:26:53] pyemkey: has joined #RubyOnRails
[09:27:59] snowy: has joined #RubyOnRails
[09:31:34] fumk: has joined #RubyOnRails
[09:33:03] Timberwo|f: has joined #RubyOnRails
[09:33:11] dionysus69: has joined #RubyOnRails
[09:33:24] FooMunki: has joined #RubyOnRails
[09:33:40] neanderslob: has joined #RubyOnRails
[09:37:43] Devalo: has joined #RubyOnRails
[09:42:02] msyvich: has joined #RubyOnRails
[09:45:21] bronson: has joined #RubyOnRails
[09:46:45] marr: has joined #RubyOnRails
[09:47:05] rikkipitt: has joined #RubyOnRails
[09:48:04] rikkipitt: hey folks, is it possible to write a scope for conditions of a polymorphic association? e.g. to see if articleable items are published for example
[09:48:35] sevenseacat: thatsa good word. 'articleable'.
[09:49:07] rikkipitt: sevenseacat: thanks!
[09:49:23] rikkipitt: i hate naming things
[09:51:26] Spami: has joined #RubyOnRails
[09:51:51] rikkipitt: Here's a redacted gist, to give you the gist - https://gist.github.com/rikkipitt/eddbc4fbcffff9510e58
[09:53:19] rikkipitt: actually, nevermind... I've done it
[09:53:41] askhat: has joined #RubyOnRails
[09:53:58] bruce__lee: has joined #RubyOnRails
[09:56:03] kitsuneyo: has joined #RubyOnRails
[09:57:18] chouhoulis: has joined #RubyOnRails
[09:58:11] zeknox: has joined #RubyOnRails
[09:58:13] _3by8: has joined #RubyOnRails
[10:00:21] _3by8: I have a bunch of information about order items I'm trying to keep from being modified by customers. Isn't there a way to save information about an instance variable and pass it from, say, new to create behind the scenes?
[10:00:43] lubekpl: has joined #RubyOnRails
[10:00:53] awea: has joined #RubyOnRails
[10:05:04] _3by8: adaedra: that works I guess... there's not like an "official" way of doing it? I'm reading something about nested resources... do you know about those?
[10:05:08] ziyadb: has joined #RubyOnRails
[10:05:27] Voxnihili1618: has joined #RubyOnRails
[10:09:01] adaedra: What's not "official" about session?
[10:09:09] trinaldi: has joined #RubyOnRails
[10:09:13] nettoweb: has joined #RubyOnRails
[10:12:54] Dbugger: I would like to know your opinion, guys and girls. I want to build an app to track performance of an app, through their commit history. Basically, everytime there is a new commit, run performance tests on it, so that I can identify what commit added a performance loss. My first question would be... exist already such an app? I don't want to reinvent the wheel :)
[10:13:21] ql6wlld: has joined #RubyOnRails
[10:22:33] msyvich: has joined #RubyOnRails
[10:22:59] lxsameer: has joined #RubyOnRails
[10:23:13] Detch: has joined #RubyOnRails
[10:23:40] AimlessRAven: has joined #RubyOnRails
[10:23:58] ddv: dbugger: this is called continuous integration (CI)
[10:24:36] ddv: dbugger: basically when you push to a branch, the CI system wil run your tests (rspec, minitest etc)
[10:25:55] rhizome: has joined #RubyOnRails
[10:27:31] arup_r: has joined #RubyOnRails
[10:27:35] woo: has joined #RubyOnRails
[10:28:55] Dbugger: ddv, I thought so as well. My team head wanted a solution that could install locally in the office. Do you know anything like that?
[10:29:18] ddv: dbugger: we use ci within gitlab
[10:29:35] Dbugger: ddv, The problem is that we do not have any Git management system, like GiLab
[10:29:48] Dbugger: THe repo is just there, and someone had to send me by email the repo link :P
[10:32:20] jsrn_: has joined #RubyOnRails
[10:32:28] durexlw: has joined #RubyOnRails
[10:32:51] arup_r: durexlw: good here
[10:32:59] ddv: dbugger: good time to introduce such a system sthen
[10:33:14] durexlw: arup_r: sounds like you just hooked up with four girls :)
[10:33:42] durexlw: ... at least :)
[10:34:57] chipotle: has joined #RubyOnRails
[10:35:15] Dbugger: ddv, Is Gitlab-CI extendable?
[10:35:29] ddv: dbugger: it's opensource so yeah
[10:35:31] Dbugger: They will probably want to customize how performance evolution is shown through commits
[10:36:11] Dbugger: ddv, I know it is opensource :) I was just wondering if it is "friendly" extendable, or I will have to dive right into the core code code of Gitlab :)
[10:36:29] ddv: no idea to be honest
[10:37:13] arup_r: durexlw: Nah, I didn't hook any where.. something wrong sounded there..
[10:37:32] nettoweb: hello guys, Im wanting to sort a list of rsult by the number of ocurrences, but I dont know if I need to tweek the sql command. here are my code: https://gist.github.com/osnysantos/e8ea2814825855703748
[10:37:49] nettoweb: can a simple tweak the order by to get it?
[10:37:57] rodfersou: has joined #RubyOnRails
[10:38:42] durexlw: nettoweb: interesting use of the "result(distinct: true)"... didn't know that notation was possible
[10:38:50] Dbugger: ddv, I agree that this will be the most effective way to do it. I just hope my team will accept it. They are German, and they have a very "I rather do it myself" philosophy usually :)
[10:38:59] durexlw: nettoweb: what output do you get?
[10:39:50] futilegames: has joined #RubyOnRails
[10:40:02] nettoweb: durexlw with @q.result(distinct: true).order('tags.id desc').page(params[:page]) ?
[10:40:08] Devalo: has joined #RubyOnRails
[10:40:16] pyemkey: has joined #RubyOnRails
[10:40:59] itsgokul: what is cattr_reader
[10:41:13] durexlw: yeah, so you want to order it by tags.id, so you want to order it in the ordre that the tags were added. But I guess this isn't working as you expect?
[10:43:35] arup_r: itsgokul: it is class attribute reader
[10:43:49] nettoweb: no... the sec column show count of taggings, I want to sort by that column, the default is id, but I want to add this another sort
[10:44:00] baweaver: has joined #RubyOnRails
[10:44:35] durexlw: nettoweb: on what would you like to sort then?
[10:45:19] nettoweb: did you see the table? there are 2 columns, I want to sort by the second one.
[10:45:30] yardenbar: has joined #RubyOnRails
[10:45:49] nettoweb: I want to order by this column: <%= tag.taggings.count %>
[10:46:19] pawnbox: has joined #RubyOnRails
[10:46:39] durexlw: nettoweb: must have missed the table, one sec
[10:48:35] durexlw: nettoweb: seems like you're running into the same I had a while ago. I was kinda unsatified when I hear the answer, but if you want to sort on this, you need to keep track of the total count in the parent table, so in your case in the tag-table, keep track how much it was tagged
[10:48:59] durexlw: I'm still hoping there's another way, but haven't found it yet
[10:49:35] nettoweb: do you have an example? I havent done this before.
[10:53:53] yfeldblum: has joined #RubyOnRails
[10:55:13] Ergo: has joined #RubyOnRails
[10:55:37] ldnunes: has joined #RubyOnRails
[10:58:03] chouhoulis: has joined #RubyOnRails
[10:59:35] durexlw: nettoweb: in your tags column, make a "tagged_count" or something. In your controller where you assign a tag, increase this field each time the tag is tagged
[10:59:53] durexlw: then sort tags on tagged_count to get what you need
[11:00:05] nettoweb: ohh yes that's a good idea
[11:00:56] durexlw: if anyone here would know a different idea to sort based on the count of an associated model, please share... kinda a pitty if you ask me to create double data
[11:02:55] dstarh: has joined #RubyOnRails
[11:05:31] fernandomm: has joined #RubyOnRails
[11:06:09] aloneintheworld: has joined #RubyOnRails
[11:06:49] rapha: has joined #RubyOnRails
[11:07:35] silverdust: I've been trying to find where the meaning of paperclip path options are but i can't. I see :path => :'id/:class/:basename.:extension' but I don't know what :class is
[11:07:41] Snowy_: has joined #RubyOnRails
[11:08:00] rhizome: durexlw: counter_cache
[11:10:17] rapha: Is there a good way to "convert" exceptions caused by user agents requesting outdated assets into a 410 or something?
[11:10:21] Voxnihili1618: has joined #RubyOnRails
[11:10:33] rapha: (I mean things like ActionController::RoutingError (No route matches [GET] "/assets/favicon-3a384c809cba1542d71cb42b2c90e44f6b9411ac13c6dc3db5b8263c21b7a4b6.ico"))
[11:14:43] blackhuey: has joined #RubyOnRails
[11:16:44] artto: has joined #RubyOnRails
[11:17:56] durexlw: rhizome: thanks for sharing man. It's essentially the same process, but it removes the extra controller code, so that's cool
[11:18:31] durexlw: nettoweb: http://railscasts.com/episodes/23-counter-cache-column
[11:20:49] nettoweb: durexlw Im lokking right now, thans man
[11:21:16] deweysdecimal: has joined #RubyOnRails
[11:21:38] durexlw: nettoweb: here's a shorter version: http://yerb.net/blog/2014/03/13/three-easy-steps-to-using-counter-caches-in-rails/
[11:21:56] c355E3B: has joined #RubyOnRails
[11:22:02] nettoweb: durexlw Im trying to achieve this with: https://github.com/mbleigh/acts-as-taggable-on
[11:22:17] jeanlinux: has joined #RubyOnRails
[11:22:49] nettoweb: so the counter number would be saved in tag and tagging tables
[11:23:20] durexlw: nettoweb: I expect it only in the tag-table
[11:24:15] nettoweb: durexlw yep, but I have many models with tags, so in my admin I filter by these models and want to show the result as well,
[11:24:45] Timberwo|f: has joined #RubyOnRails
[11:25:25] snowy: has joined #RubyOnRails
[11:25:46] matthewd: rapha: How can you tell the difference between an old-and-gone asset digest, and one that the server doesn't know about yet?
[11:26:00] nettoweb: right now Im trying to create a model for Tag so I can create the callbacks
[11:27:22] durexlw: nettoweb: if I understand with polymorphic associations, it boils down to: there's a unique reference by the combination of type and id, so say you have two models that are taggable, you have two rows. Whatever this table is called, that's where you want the counter
[11:29:42] jeanre: has joined #RubyOnRails
[11:30:01] jeanre: has joined #RubyOnRails
[11:31:19] nettoweb: durexlw http://snag.gy/ahsFH.jpg
[11:31:36] mhoungbo: has joined #RubyOnRails
[11:32:06] durexlw: nettoweb: my spanish is a bit rusty ;) but looks good, no?
[11:32:59] nettoweb: durexlw ... when filter by a specific taggable, it wont work
[11:40:24] pyemkey: has joined #RubyOnRails
[11:41:55] nettoweb: durexlw I want to create a callback every time a tag is created and even a tagging
[11:43:43] durexlw: nettoweb: sounds like a valid option.
[11:43:48] Voxnihili1618: has joined #RubyOnRails
[11:44:03] durexlw: did you check the docs to see if the gem doesn't provide this functionality... it sounds really common to me
[11:45:34] lacrymology: has joined #RubyOnRails
[11:46:38] bronson: has joined #RubyOnRails
[11:48:16] Cohedrin: has joined #RubyOnRails
[11:50:15] myntcake: has joined #RubyOnRails
[11:50:57] nettoweb: durexlw dont have. Im creating an admin interface for manage tags, so that's why I need this specific feature
[11:51:50] durexlw: nettoweb: I see
[11:54:43] lxsameer: has joined #RubyOnRails
[11:58:50] chouhoulis: has joined #RubyOnRails
[12:01:42] artto: has joined #RubyOnRails
[12:02:50] speaking1ode: has joined #RubyOnRails
[12:10:29] ql6wlld: has joined #RubyOnRails
[12:12:29] jeanlinux: has joined #RubyOnRails
[12:19:58] svkurowski: I upgraded to rails 5 and want to implement websockets using this guide (https://github.com/rails/rails/tree/master/actioncable) with thin as the server, but I get this message when connecting via JS: WebSocket connection to 'ws://localhost:28080' failed: Error during WebSocket handshake: 'Upgrade' header is missing
[12:20:11] svkurowski: Has anyone encountered this?
[12:20:34] chipotle: has joined #RubyOnRails
[12:20:57] s2013: has joined #RubyOnRails
[12:24:28] jeanlinux: has joined #RubyOnRails
[12:28:15] jeanlinux: has joined #RubyOnRails
[12:28:57] jeanlinux: has joined #RubyOnRails
[12:29:29] defsdoor: has joined #RubyOnRails
[12:31:51] woo: has joined #RubyOnRails
[12:32:35] godzillaenlacasa: has joined #RubyOnRails
[12:34:08] htmldrum: has joined #RubyOnRails
[12:35:33] matthewd: People still choose to use thin? :|
[12:35:57] helpa: ¯\_(ツ)_/¯ Sorry, sevenseacat is not able to help you any further as they do not know.
[12:38:05] matthewd: svkurowski: To attempt a vaguely more helpful answer: no I haven't.. it's probably related to thin: it doesn't support rack hijack
[12:38:49] matthewd: svkurowski: There's some code I copied from faye that is, I think, supposed to use a thin-specific mechanism, but I've made no attempt to prove it works
[12:38:52] svkurowski: Oh I will try puma then.. The guide says "If you are using a threaded server like Puma or Thin, the current implementation of ActionCable can run side-along with your Rails application."
[12:39:04] sevenseacat: well puma is the default in rails 5, so
[12:39:27] sevenseacat: it's probably a better choice :)
[12:39:58] matthewd: I guess we should fix the guide then.. especially as one of thin's defining characteristics is that it's *not* threaded :P
[12:40:33] sled: has joined #RubyOnRails
[12:41:03] bbrowning: has joined #RubyOnRails
[12:44:18] rapha: matthewd: Okay, so that would be a problem with 410. But since I only want to get rid of exceptions in the log files (and instead get a simple message like "so and so requested, responded with 404") that should be possible somehow, right? (I'm already doing rescue_from ActionController::RoutingError, which for some reason doesn't apply for assets...)
[12:44:20] roshanavand: has joined #RubyOnRails
[12:45:26] baweaver: has joined #RubyOnRails
[12:46:13] akshat: has joined #RubyOnRails
[12:46:39] jeanlinux: has joined #RubyOnRails
[12:46:45] matthewd: rapha: Personally I normally solve it by telling nginx that it is the final authority on /assets, so rails never sees the request in the first place
[12:47:21] rapha: That's something I hadn't thought of at all.
[12:47:26] rapha: Thank you for the idea, matthewd!
[12:48:45] matthewd: Basically where you match /assets to set better caching headers, just make sure it also "unproxies" it
[12:48:59] worknick: has joined #RubyOnRails
[12:49:17] sevenseacat: here's trouble
[12:49:28] jottr: has joined #RubyOnRails
[12:49:57] worknick: Can user "and" for var.where.not(:user_id=>currentuser and :user_id=>someothervar.id)
[12:50:03] rapha: matthewd: There's loads of configuration snippets all over the net, I'm reading up now on how people do it.
[12:50:25] _Tariq: has joined #RubyOnRails
[12:50:45] matthewd: worknick: Use an array
[12:50:47] sevenseacat: worknick: where will accept an array of field values.
[12:51:18] s2013: has joined #RubyOnRails
[12:51:22] hamed_r: has joined #RubyOnRails
[12:51:36] snowy: has joined #RubyOnRails
[12:53:05] htmldrum: has joined #RubyOnRails
[12:55:30] trinaldi: has joined #RubyOnRails
[12:57:37] Snowy_: has joined #RubyOnRails
[12:58:51] s2013: has joined #RubyOnRails
[12:59:26] kitsuneyo: has joined #RubyOnRails
[12:59:32] chouhoulis: has joined #RubyOnRails
[12:59:52] kitsuneyo: is hiding and showing form sections with jquery an acceptable way to do multi-page forms?
[13:00:10] kitsuneyo: why not sevenseacat?
[13:00:21] sevenseacat: because that's not a multi-page form
[13:00:30] johnflux: has joined #RubyOnRails
[13:00:31] johnflux: has joined #RubyOnRails
[13:00:33] sevenseacat: its one page with some hidden bits
[13:01:02] kitsuneyo: is there anything wrong or risky about that though?
[13:01:58] sevenseacat: depends what you mean by wrong or risky
[13:02:16] kitsuneyo: i mean security-wise
[13:02:28] embasbm: has joined #RubyOnRails
[13:03:13] sevenseacat: well, losing all of the data entered in previous steps of the form would suck, if the user navigates away halfway through
[13:04:24] kitsuneyo: yeah, i guess having hidden, potentially unsaved data is not so good
[13:05:06] trinaldi: has joined #RubyOnRails
[13:05:42] kitsuneyo: thanks sevenseacat
[13:05:45] Devalo: has joined #RubyOnRails
[13:05:45] sevenseacat: also, assuming you're only doing validations at the end on the server side, is a pretty lame user experience
[13:06:06] kitsuneyo: that's a pretty good point
[13:06:36] sevenseacat: i mean sure you could write a lot of js to make it all work properly but is it really worth the effort?
[13:06:52] kitsuneyo: writing a lot of js is not my goal
[13:07:05] hcnewsom: has joined #RubyOnRails
[13:08:28] gokulnath: has joined #RubyOnRails
[13:08:31] kitsuneyo: i think i remember you use wicked sevenseacat? because i tried it once before too
[13:08:48] sevenseacat: wicked is a great gem. it can be a little fiddly, but saves so much time and effort
[13:09:40] kitsuneyo: the thing i didn't like about wicked is, it seemed to want to force a sequence on the form pages. i want users to be able to choose any of the pages in the order they want
[13:09:44] Ergo^: has joined #RubyOnRails
[13:09:53] shibly: has joined #RubyOnRails
[13:09:53] kitsuneyo: because they'll be updating records that have been created previously
[13:10:14] kitsuneyo: is there a way to do that with wicked that i just missed?
[13:10:22] aloneintheworld: has joined #RubyOnRails
[13:10:25] shibly: has left #RubyOnRails: ()
[13:10:54] arup_r: has joined #RubyOnRails
[13:11:11] Eswar: has joined #RubyOnRails
[13:11:46] sevenseacat: thats kinda separate from wicked, that's just you creating navigation to link to all the different steps
[13:12:11] kitsuneyo: lol i guess so
[13:12:33] kitsuneyo: hopefully my skills improved slightly since i last tried it
[13:12:54] kitsuneyo: thanks, seeya
[13:15:07] silverdust: Hi sevenseacat
[13:15:34] openstruct: has joined #RubyOnRails
[13:16:04] silverdust: I'm trying to make an option on whether to use timestamp or id in my filepath for uploads. which would you recommend?
[13:16:16] openstruct: has joined #RubyOnRails
[13:16:16] openstruct: has joined #RubyOnRails
[13:16:39] sevenseacat: um.... probably an ID
[13:17:33] artto: has joined #RubyOnRails
[13:18:08] EdwardIII: timestamps can collide
[13:18:52] silverdust: I'm considering timestamp b'cos Ids are colliding. I have a single uploads table for multiple other models (a polymorphic relationship)
[13:19:19] Hates_: how are they colliding? are you generating them yourself?
[13:19:26] woo: has joined #RubyOnRails
[13:19:28] franzip: has joined #RubyOnRails
[13:19:29] silverdust: I discovered some uploads override existing ones
[13:19:49] Hates_: that shouldn't happen
[13:19:51] rvanlieshout: how could ids be colliding?
[13:20:40] sevenseacat: ids definitely shouldnt override, given it should be a primary key
[13:21:58] silverdust: I structured the upload model poorly from the start. Didn't set a polymorphic association
[13:22:22] Hates_: silverdust: the polymorphism shouldn't be the issue
[13:22:49] nettoweb: durexlw hey mna, take a look at my issue I've created there: https://github.com/mbleigh/acts-as-taggable-on/issues/735
[13:23:07] arup_r: has joined #RubyOnRails
[13:23:16] hcnewsom: has joined #RubyOnRails
[13:23:20] nettoweb: I dont know if people will understand what I'm looking for but I think I was clear, what do you think?
[13:23:41] silverdust: room has_many uploads, collection has_many uploads. The records already exist. When I update a room with the same uploadable_id as a collection. collections upload is deleted for the room upload
[13:23:58] silverdust: That's exactly what I've been dealing with. Took some time for me to figure it out
[13:26:00] veloutin: has joined #RubyOnRails
[13:27:05] silverdust: I decided to change the paperclip path. It's weird but I've watched it repeat the same behavior on papertrail
[13:27:37] durexlw: nettoweb: can you make it concrete, so give an example: what can be tagged, what is taggable and what's the table called that associates those two?
[13:28:34] mdw: has joined #RubyOnRails
[13:30:20] nettoweb: I didnt mentioned it because people there are already aware about it I think
[13:30:37] durexlw: nettoweb: ok
[13:31:01] durexlw: wouldn't be clear to me, but might be for them. Fair enough :)
[13:31:12] nettoweb: durexlw Have you ever used act_as_taggable on?
[13:31:45] durexlw: nettoweb: nope, so can't really visualize
[13:32:30] krz: has joined #RubyOnRails
[13:32:47] durexlw: I need to turn this array [:name, :lastname] into this hash: {name: row[:name], lastname: row[:lastname]} anyone has an idea how to do this?
[13:34:17] rizenine: has joined #RubyOnRails
[13:35:10] Papierkorb: >> row={foo: 123, bar: 456}; [:foo, :bar].map{|col| [ col, row[col] ]}.to_h # durexlw
[13:36:27] jottr_: has joined #RubyOnRails
[13:36:49] durexlw: Papierkorb: thanks
[13:38:08] chrisarcand: chrissonar: https://github.com/thoughtbot/suspenders is a popular one.
[13:38:24] ElFerna: has joined #RubyOnRails
[13:38:30] chrissonar: chrisarcand, already dealing with the rails_composer
[13:38:38] askhat: has joined #RubyOnRails
[13:38:39] chrissonar: but thanks :)
[13:38:55] artto: has joined #RubyOnRails
[13:39:24] chrisarcand: Hah, TIL. I don't use any such things, so my knowledge is limited but I thought I'd mention :D Good luck!
[13:41:16] ElFerna: has joined #RubyOnRails
[13:43:50] durexlw: chrisarcand: love the picture on that gem :)
[13:46:26] ramortegui: has joined #RubyOnRails
[13:48:02] hcnewsom: has joined #RubyOnRails
[13:48:20] bronson: has joined #RubyOnRails
[13:49:22] dstarh: has joined #RubyOnRails
[13:49:40] ql6wlld: has joined #RubyOnRails
[13:49:55] SeanLazer: has joined #RubyOnRails
[13:50:43] dionysus69: has joined #RubyOnRails
[13:51:51] B1n4r10: has joined #RubyOnRails
[13:52:04] dexter_: has joined #RubyOnRails
[13:57:43] lacrymology: has joined #RubyOnRails
[14:00:18] chouhoulis: has joined #RubyOnRails
[14:00:42] mrgreenfur: has joined #RubyOnRails
[14:06:51] umgrosscol: has joined #RubyOnRails
[14:07:46] durexlw: sup arup_r
[14:09:03] umgrosscol: I'm trying to set a field in the request header of every request when an application is run in development, but am not sure how to proceed.
[14:09:46] umgrosscol: All the request methods have a headers_or_env parameter that can be passed a hash which gets merged with the request header.
[14:10:25] umgrosscol: I am wondering if anyone has any thoughts about how to set this parameter globally, preferably from a single place.
[14:11:45] aloneintheworld: has joined #RubyOnRails
[14:12:35] allcentury: has joined #RubyOnRails
[14:13:11] mois3x: has joined #RubyOnRails
[14:15:01] godzillaenlacasa: For some reason I'm not able to see my favicon... getting a "403 (Forbidden)" error...
[14:15:17] godzillaenlacasa: Assets are uploaded to an S3 bucket for the pipeline
[14:15:33] godzillaenlacasa: Everything else works except my favicon. what gives?
[14:17:18] umgrosscol: godzillaenlacasa, is the url for the icon correct?
[14:17:20] IFrank00: has joined #RubyOnRails
[14:17:30] umgrosscol: godzillaenlacasa, what are the permissions for the s3 bucket set to?
[14:18:10] godzillaenlacasa: @umgrosscol yes, s3 allows everyone to read.
[14:18:33] godzillaenlacasa: @umgrosscol favicon is in public/
[14:19:08] jottr_: has joined #RubyOnRails
[14:19:10] arup_r: has joined #RubyOnRails
[14:19:40] nettoweb: has joined #RubyOnRails
[14:19:50] umgrosscol: Hmm... I think I have some s3 stuff that isn't publicly readable.
[14:20:27] godzillaenlacasa: @umgrosscol typically it wouldn't be... normally only my server is allowed... but i wanted to get rid of restrictions to figure this issue out
[14:22:01] umgrosscol: Oh. For the site, is the icon being served out of s3, your application, or nginx|apache ?
[14:22:21] umgrosscol: What's serving the static resources?
[14:23:34] godzillaenlacasa: all the assets get uploaded to s3, then the server grabs them all to create the asset pipeline (i think that's how it's working)... I deployed using Capistrano, which is new to me
[14:24:53] godzillaenlacasa: however, based on the brower developer console, it looks like I'm wrong...
[14:24:58] godzillaenlacasa: assets are loading from s3
[14:25:26] godzillaenlacasa: https://mys3bucket.amazonaws.com/images/favicon 403 (Forbidden)
[14:27:50] diegoviola: has joined #RubyOnRails
[14:27:58] andrewvos: has joined #RubyOnRails
[14:28:38] defsdoor: has joined #RubyOnRails
[14:30:21] herpless: has joined #RubyOnRails
[14:33:11] chouhoulis: has joined #RubyOnRails
[14:37:12] umgrosscol: godzillaenlacasa, Okay, so you're grabbing the asset from s3 as part of generating the static assets that will be served by the application.
[14:37:28] godzillaenlacasa: @umgrosscol yes, i think that is right
[14:37:28] umgrosscol: Or, attempting to grab the asset.
[14:38:36] umgrosscol: So that error shows up during the precompile task, or when you're running in development mode?
[14:38:38] renegadeandy: has joined #RubyOnRails
[14:39:00] chrissonar: how to secure a destroy link with an authenticity_token?
[14:39:06] godzillaenlacasa: I have the app deployed. It shows up in the browser developer console
[14:39:19] godzillaenlacasa: No errors during deployment
[14:39:28] renegadeandy: I am trying to build a collection select for a collection “Categories.all” , each category has a name, which is what i want each of the option texts to display. The values of the options should be the id of each category. What am I doing wrong : <%= collection_select(:category, :name, Category.all, :id, :name %>
[14:39:30] godzillaenlacasa: No errors in development mode (on localhost)
[14:39:33] arup_r1: has joined #RubyOnRails
[14:39:46] umgrosscol: godzillaenlacasa, the rails environment is production or development?
[14:40:41] emachnic: has joined #RubyOnRails
[14:41:03] umgrosscol: godzillaenlacasa, have you tried running the asset precompile task locally?
[14:41:20] sled: has joined #RubyOnRails
[14:41:21] godzillaenlacasa: @umgrosscol no, never had a need... how?
[14:41:56] umgrosscol: should be RAILS_ENV=production rake assets:precompile or something like that. Check rake --tasks
[14:41:58] godzillaenlacasa: @renegadeandy I think you're close: <%= collection_select(:category, :category_id, Category.all, :id, :name %>
[14:42:15] godzillaenlacasa: so run it on the production server?
[14:42:26] umgrosscol: You should be able to run that locally.
[14:43:03] godzillaenlacasa: @umgrosscol even if server is AWS?
[14:43:03] umgrosscol: It just does the asset precompile and stuffs them into public or vendor or somewhere. You can clear them all out when you're done with assets:clobber
[14:43:21] umgrosscol: That's what cap is running to build your assests.
[14:44:03] umgrosscol: It might also be telling to inspect the deployed application for the url of the favicon.
[14:44:05] drbayer: has joined #RubyOnRails
[14:44:22] umgrosscol: If it's pointing to the s3 bucket or if it's pointing to where the rest of your assets live.
[14:44:51] jsvgoncalves_: has joined #RubyOnRails
[14:45:05] umgrosscol: I think the problem is either the asset can't be pulled in when the asset pipeline is being run, or it's not being pulled in, and it's trying to be served out of s3.
[14:45:49] umgrosscol: Or something along those lines.
[14:46:10] baweaver: has joined #RubyOnRails
[14:46:42] godzillaenlacasa: @umgrosscol ok, i think you got me on the right track... starting to look at my deploy.rb now
[14:46:46] umgrosscol: I could be totally off base because I'm looking at monkey patching ActionDispatch::Request when running in development, and that seems like a terrible plan.
[14:47:20] godzillaenlacasa: @umgrosscol lol... I've done so many monkey patches on this app already, I'm surprised it works. lol
[14:50:21] rubyonrailed: has joined #RubyOnRails
[14:50:35] polishdub: has joined #RubyOnRails
[14:54:48] godzillaenlacasa: @renegadeandy any luck?
[14:54:58] treehug88: has joined #RubyOnRails
[14:55:20] renegadeandy: godzillaenlacasa: yeah that worked thank you! What if I want to set another select options based upon the one selected in a previous step ?
[14:55:37] drbayer: has joined #RubyOnRails
[14:55:37] godzillaenlacasa: @renegadeandy like a multi select?
[14:55:54] renegadeandy: they choose a value from the first select
[14:56:02] renegadeandy: then the options populate based upon that in a second select
[14:56:16] askhat: has joined #RubyOnRails
[14:57:55] godzillaenlacasa: @renegadeandy ok, like select United States... now all the states show up to select from?
[14:57:56] chipotle: has joined #RubyOnRails
[14:59:23] jtong: has joined #RubyOnRails
[15:00:21] godzillaenlacasa: @renegadeandy ...I saw a jquery library that did that really nicely... let me see if I can find it again
[15:00:33] aweis: has joined #RubyOnRails
[15:01:06] yellow5: has joined #RubyOnRails
[15:01:45] xuex: has joined #RubyOnRails
[15:01:54] godzillaenlacasa: @renegadeandy actually... here's a good railscast: http://railscasts.com/episodes/88-dynamic-select-menus?view=comments
[15:02:12] xuex: good morning
[15:02:19] s2013: has joined #RubyOnRails
[15:02:44] renegadeandy: is that still going to work? Made in 2008?
[15:03:05] godzillaenlacasa: @renegadeandy yeah, it should...
[15:03:12] renegadeandy: wonderful will try that out
[15:03:25] aweis: has joined #RubyOnRails
[15:03:29] durexlw: morning xuex
[15:04:27] kmckelvin: has joined #RubyOnRails
[15:04:29] flashpoint9: has joined #RubyOnRails
[15:06:00] embasbm: has joined #RubyOnRails
[15:06:20] mag42c: has joined #RubyOnRails
[15:08:49] defsdoor: has joined #RubyOnRails
[15:12:02] sled: has joined #RubyOnRails
[15:13:53] renegadeandy: godzillaenlacasa: thanks for your help, ttyl
[15:13:54] renegadeandy: has left #RubyOnRails: ()
[15:15:12] melter: has joined #RubyOnRails
[15:16:16] dangeranger: has joined #RubyOnRails
[15:16:20] VeryBewitching: has joined #RubyOnRails
[15:16:30] malcolmva: has joined #RubyOnRails
[15:17:28] Macaveli: has joined #RubyOnRails
[15:18:20] sankaber: has joined #RubyOnRails
[15:19:01] jeanre: has joined #RubyOnRails
[15:19:06] mdw: has joined #RubyOnRails
[15:19:52] pawnbox: has joined #RubyOnRails
[15:20:30] wenchenx_: has joined #RubyOnRails
[15:20:44] sankaber: has joined #RubyOnRails
[15:20:54] lacrymology: has joined #RubyOnRails
[15:22:01] adavia: has joined #RubyOnRails
[15:22:42] ravster: has left #RubyOnRails: ("ERC (IRC client for Emacs 24.5.1)")
[15:24:10] mrbubbles: has joined #RubyOnRails
[15:24:12] Devalo: has joined #RubyOnRails
[15:24:35] vedu: which would be a good guide to understand rack, middleware, actionpack, etc- Basically an overview of how rails works under the hood?
[15:25:36] mag42c: has joined #RubyOnRails
[15:25:44] havenwood: vedu: Make a Rack app yourself then add a few routes and errors. Then make a middleware that does something trivial.
[15:26:26] KensoDev: has joined #RubyOnRails
[15:26:35] vedu: havenwood: right now I have no idea what these terms even mean :)
[15:27:00] havenwood: vedu: It's actually pretty easy to make a tiny Rack app!: http://rack.github.io
[15:27:22] havenwood: vedu: I think creating a `config.ru` and running `rackup` is a great way to see how it works.
[15:27:51] vedu: havenwood: I just opened the same page. I understood what you mean. will do that
[15:28:10] IanMalcolm: has joined #RubyOnRails
[15:28:45] IanMalcolm: guys, I have a few Exception classes under lib/exceptions.rb, but when I try to rescue from them inside a controller, I get `NameError (uninitialized constant MailController::Exceptions)`
[15:29:01] havenwood: vedu: Here are some Hello Worlds in various Rack adapters, for reference: https://github.com/luislavena/bench-micro/tree/master/apps
[15:29:10] IanMalcolm: has joined #RubyOnRails
[15:29:14] aloneintheworld: has joined #RubyOnRails
[15:30:09] IanMalcolm: has joined #RubyOnRails
[15:32:59] alevy: has joined #RubyOnRails
[15:34:43] s2013: has joined #RubyOnRails
[15:36:41] zackzorman: has joined #RubyOnRails
[15:37:00] futilegames: has joined #RubyOnRails
[15:37:08] chouhoulis: has joined #RubyOnRails
[15:37:37] ilhami: has joined #RubyOnRails
[15:37:43] ilhami: sevenseacat, are you sleeping?
[15:37:51] ilhami: I may have some questions later.
[15:37:55] IanMalcolm: has joined #RubyOnRails
[15:38:08] sevenseacat: please leave a message after the beep.
[15:38:10] sevenseacat: ACTION beeps
[15:38:17] franzip: has joined #RubyOnRails
[15:38:26] IanMalcolm: guys, I have a few Exception classes under lib/exceptions.rb, but when I try to rescue from them inside a controller, I get `NameError (uninitialized constant MailController::Exceptions)`
[15:38:27] jayne: has joined #RubyOnRails
[15:38:40] IanMalcolm: (this message might have been duplicated because my bouncer was wonky)
[15:38:47] drbayer: has joined #RubyOnRails
[15:39:43] Sceko: has joined #RubyOnRails
[15:39:44] Sceko: has joined #RubyOnRails
[15:40:50] gokulnath: has joined #RubyOnRails
[15:41:42] dn5: has joined #RubyOnRails
[15:41:45] alextheger: has joined #RubyOnRails
[15:42:44] dn5: How does one add a class to a tag over erb? Like <i class="icon <%= @icon %>"></i>
[15:43:14] Devalo: has joined #RubyOnRails
[15:44:07] rafaelfranca: has joined #RubyOnRails
[15:44:56] codepete: has joined #RubyOnRails
[15:47:38] arup_r1: dn5: tag :i, class: ["icon", @icon ] will work
[15:47:59] reckoner: has joined #RubyOnRails
[15:48:00] arup_r1: <%= tag :i, class: ["icon", @icon ] %> will work
[15:48:18] yardenbar: has joined #RubyOnRails
[15:51:44] futilegames: has joined #RubyOnRails
[15:53:17] dopamean_: has joined #RubyOnRails
[15:53:43] dn5: arup_r_: Thanks, let me try that.
[15:54:19] reckoner: i'm looking for microservices articles specifically about dogfooding internal apis.
[15:54:39] reckoner: send some good reference material my way please.
[15:54:54] nogic: has joined #RubyOnRails
[15:55:29] arup_r1: ahh,, long time I worked on any Rails API projects,, love Jbuilders.. :)
[15:56:14] arup_r1: I didn't work*** :p
[15:56:15] nogic: has joined #RubyOnRails
[15:56:35] dn5: arup_r_: well, this is strange. I got a loop of the tag itself several times
[15:56:37] polishdub: has joined #RubyOnRails
[15:56:50] dn5: could it be because it's inside an <li> ?
[15:56:52] arup_r1: dn5: show the ocde
[15:57:02] maximumgeek: has joined #RubyOnRails
[15:57:07] arup_r1: yes,, that's the reason may be..
[15:57:08] dexter_: has joined #RubyOnRails
[15:57:16] arup_r1: need to see why loop.. :)
[15:57:27] nogic: has joined #RubyOnRails
[15:57:47] dn5: arup_r_: it's a basic html but I'll paste the code anyway
[15:58:44] dn5: arup_r_: https://gist.github.com/dn5/b164f42a12afb3357a7e#file-index-html-erb-L14
[15:58:47] nogic: has joined #RubyOnRails
[15:58:50] arup_r1: dn5: I know. What I said shouldn't create any loop, it just prints a HTML. Loop is happening, due to some code you wrote there.. it is not due to the fact that u used `#tag` method.. :D
[16:00:02] nogic: has joined #RubyOnRails
[16:00:06] arup_r1: ok, I don't see the reason of loop from the gist any..
[16:01:07] dn5: arup_r_: when I use <i> tag regularly loop does not happen
[16:01:19] nogic: has joined #RubyOnRails
[16:02:28] nogic: has joined #RubyOnRails
[16:02:38] arup_r1: dn5: show the generated HTML from browser..
[16:03:09] dn5: arup_r_: ah, gotcha, there is no </i>
[16:03:29] dn5: arup_r_: fixed.
[16:03:33] nogic: has joined #RubyOnRails
[16:03:34] dn5: the tag was generated
[16:03:47] dn5: but not the closing tag too
[16:04:15] null__: quick question -- what's a good way to check for presence/empty on an <%= f.fields_for :images do |i| %>? I basically just want to display a message if no images exist
[16:04:16] nogic: has joined #RubyOnRails
[16:04:37] arup_r1: dn5: sorry, use content_tag not `tag`..
[16:04:56] nogic: has joined #RubyOnRails
[16:05:04] reckoner: fields_for :images, object.images.present?
[16:05:11] arup_r1: dn5: give me the HTML again, I will give you the ERb code
[16:05:37] null__: object.images.present? would go before the do block?
[16:05:41] arup_r1: dn5: tag is for elements like <br/> <input ... />
[16:05:57] reckoner: object.images.present? ? object.images.url : "foo.com/image/path"
[16:06:01] arup_r1: and content_tag is for elements which has open and close tag
[16:06:08] Frem: has joined #RubyOnRails
[16:06:16] nogic: has joined #RubyOnRails
[16:06:21] null__: oh I see, thanks
[16:06:35] dn5: arup_r_: yes, thats what I mean when I talk about tag. One second.
[16:06:43] neshmi: has joined #RubyOnRails
[16:06:48] reckoner: somethign like that. it's not explicity right.
[16:06:57] nogic: has joined #RubyOnRails
[16:06:58] null__: yeah no problem
[16:06:59] dn5: arup_r_: https://gist.github.com/dn5/b164f42a12afb3357a7e#file-index-html-erb-L14
[16:07:35] nogic: has joined #RubyOnRails
[16:07:55] arup_r1: dn5: Give me the raw html .. I will write ERB for you :) Or look up the content_tag documentation. it is pretty easy to understand
[16:08:12] nogic: has joined #RubyOnRails
[16:08:50] yellow5: has joined #RubyOnRails
[16:08:51] nogic: has joined #RubyOnRails
[16:09:01] dn5: arup_r_: whats the difference?
[16:09:19] kies^: has joined #RubyOnRails
[16:09:24] bruce__lee: has joined #RubyOnRails
[16:09:39] nogic: has joined #RubyOnRails
[16:10:02] arup_r1: dn5: check the examples http://api.rubyonrails.org/classes/ActionView/Helpers/TagHelper.html#method-i-tag
[16:10:14] nogic: has joined #RubyOnRails
[16:11:14] Rodya_: has joined #RubyOnRails
[16:11:19] nogic: has joined #RubyOnRails
[16:11:31] arup_r1: now see http://api.rubyonrails.org/classes/ActionView/Helpers/TagHelper.html#method-i-content_tag
[16:11:45] maximumgeek: has joined #RubyOnRails
[16:11:57] arup_r1: hope after reading those 2 you will get the difference between them
[16:12:22] nogic: has joined #RubyOnRails
[16:12:28] tildes: has joined #RubyOnRails
[16:13:03] silverdust: So I was right. I deleted all my room rows and re-added them and I didn't have to change my paperclip path to use timestamps. Still on ids
[16:13:25] nogic: has joined #RubyOnRails
[16:13:46] silverdust: It was because the association wasn't initially built to be polymorphic
[16:14:13] nogic: has joined #RubyOnRails
[16:15:06] nogic: has joined #RubyOnRails
[16:15:21] trinaldi: has joined #RubyOnRails
[16:15:41] embasbm: has joined #RubyOnRails
[16:15:45] nogic: has joined #RubyOnRails
[16:15:54] htmldrum: has joined #RubyOnRails
[16:16:24] nogic: has joined #RubyOnRails
[16:17:05] nogic: has joined #RubyOnRails
[16:17:47] nogic: has joined #RubyOnRails
[16:18:26] nogic: has joined #RubyOnRails
[16:19:01] mois3x: has joined #RubyOnRails
[16:19:04] nogic: has joined #RubyOnRails
[16:19:42] nogic: has joined #RubyOnRails
[16:20:17] reckoner: has left #RubyOnRails: ()
[16:20:23] nogic: has joined #RubyOnRails
[16:21:03] lubekpl: has joined #RubyOnRails
[16:21:04] nogic: has joined #RubyOnRails
[16:21:44] nogic: has joined #RubyOnRails
[16:22:26] nogic: has joined #RubyOnRails
[16:22:54] openstruct: has joined #RubyOnRails
[16:22:54] openstruct: has joined #RubyOnRails
[16:23:05] nogic: has joined #RubyOnRails
[16:23:07] rubyonrailed: has joined #RubyOnRails
[16:23:43] nogic: has joined #RubyOnRails
[16:23:46] KensoDev: has joined #RubyOnRails
[16:24:14] nachoman: has joined #RubyOnRails
[16:24:24] ss_much: has joined #RubyOnRails
[16:24:49] nogic: has joined #RubyOnRails
[16:25:56] nogic: has joined #RubyOnRails
[16:26:33] nogic: has joined #RubyOnRails
[16:27:10] nogic: has joined #RubyOnRails
[16:27:31] disgrntld: has joined #RubyOnRails
[16:27:38] drbayer: has joined #RubyOnRails
[16:27:49] nogic: has joined #RubyOnRails
[16:28:30] nogic: has joined #RubyOnRails
[16:29:10] nogic: has joined #RubyOnRails
[16:29:46] nogic: has joined #RubyOnRails
[16:30:25] nogic: has joined #RubyOnRails
[16:31:30] dangeranger: has joined #RubyOnRails
[16:32:57] htmldrum: has joined #RubyOnRails
[16:33:02] angeloc: has joined #RubyOnRails
[16:33:16] stannard_: has joined #RubyOnRails
[16:33:25] nogic: has joined #RubyOnRails
[16:35:00] yardenbar: has joined #RubyOnRails
[16:35:04] nogic: has joined #RubyOnRails
[16:35:13] krz: has joined #RubyOnRails
[16:36:20] IanMalcolm: guys, I'm having trouble with strong parameters. https://gist.github.com/7d0988090a54bf052304
[16:36:43] mag42c_: has joined #RubyOnRails
[16:36:54] IanMalcolm: when I hit this controller, I get `NoMethodError (private method `require' called for "mail@test.com":String):`
[16:36:57] nogic: has joined #RubyOnRails
[16:37:14] IanMalcolm: as if the first `require` were returning a string
[16:37:26] dionysus69: has joined #RubyOnRails
[16:37:36] nogic: has joined #RubyOnRails
[16:37:52] umgrosscol: has joined #RubyOnRails
[16:38:17] nogic: has joined #RubyOnRails
[16:38:35] kdough: has joined #RubyOnRails
[16:38:39] arup_r1: IanMalcolm: as far as I know you can require only once.. not the one you used.
[16:38:55] nogic: has joined #RubyOnRails
[16:39:34] filipechagas: has joined #RubyOnRails
[16:39:52] nogic: has joined #RubyOnRails
[16:40:10] NeoHamled: has joined #RubyOnRails
[16:40:27] Maletor: has joined #RubyOnRails
[16:40:33] nogic: has joined #RubyOnRails
[16:41:27] nogic: has joined #RubyOnRails
[16:42:28] nogic: has joined #RubyOnRails
[16:43:06] Rodya_: has joined #RubyOnRails
[16:44:16] nogic: has joined #RubyOnRails
[16:44:24] nfk: has joined #RubyOnRails
[16:44:59] nogic: has joined #RubyOnRails
[16:45:02] htmldrum: has joined #RubyOnRails
[16:46:06] rafaelfranca: has joined #RubyOnRails
[16:46:21] nogic: has joined #RubyOnRails
[16:47:01] greenhat: What does your params hash look like?
[16:47:04] baweaver: has joined #RubyOnRails
[16:47:20] dretnx: has joined #RubyOnRails
[16:47:28] kies^: has joined #RubyOnRails
[16:47:35] greenhat: I'm guessing you want something like params.require(:email).permit(:to, :from, :template, :content)
[16:48:02] JoshyJosh: has joined #RubyOnRails
[16:48:37] nogic: has joined #RubyOnRails
[16:49:18] gokulnath: has joined #RubyOnRails
[16:49:25] nogic: has joined #RubyOnRails
[16:49:39] safety_cut: has joined #RubyOnRails
[16:49:40] mag42c: has joined #RubyOnRails
[16:49:57] greenhat: Given that you aren't using mass assignment in that code I don't think strong params buys you much anyway.
[16:50:03] nogic: has joined #RubyOnRails
[16:50:15] woo: has joined #RubyOnRails
[16:51:18] JoshyJosh: can someone help me with a helper test?
[16:52:37] greenhat: https://rurounijones.github.io/blog/2009/03/17/how-to-ask-for-help-on-irc/
[16:52:41] arup_r1: JoshyJosh: yes ofcourse
[16:53:20] mag42c_: has joined #RubyOnRails
[16:53:33] smathy: has joined #RubyOnRails
[16:53:33] cleopatra: has joined #RubyOnRails
[16:54:11] johnflux: has joined #RubyOnRails
[16:54:13] cleopatra: hello friends
[16:54:54] nesQuick: has joined #RubyOnRails
[16:55:57] nogic: has joined #RubyOnRails
[16:56:00] arup_r1: cleopatra: after long time.. o/
[16:56:52] xploshioon: has joined #RubyOnRails
[16:57:03] mostlybadfly: has joined #RubyOnRails
[16:57:06] cleopatra: yeah arup_r_ I've been busy in #c++ and #winapi :)
[16:57:37] htmldrum: has joined #RubyOnRails
[16:57:45] nachoman: IanMalcolm: you should try doing many requires (http://stackoverflow.com/questions/30009620/rails-4-require-and-permit-multiple)
[16:58:42] navo: has joined #RubyOnRails
[16:59:31] s2013: has joined #RubyOnRails
[16:59:44] arup_r1: didn't know it is possible
[16:59:50] [Butch]: has joined #RubyOnRails
[16:59:50] cabargas: has joined #RubyOnRails
[17:00:31] B1n4r10: has joined #RubyOnRails
[17:03:12] cleopatra: how many regards takes on a rails developer per hour!
[17:03:27] Rodya_: has joined #RubyOnRails
[17:04:12] creyes: has joined #RubyOnRails
[17:05:08] rafaelfranca: has joined #RubyOnRails
[17:05:29] pawnbox: has joined #RubyOnRails
[17:05:35] c0defeed: has joined #RubyOnRails
[17:06:07] creyes: Radar: If you're around, I have a multitenancy question. Does your 2nd book cover query'ing across instances in a multi-tenant application?
[17:06:24] slash_nick: creyes: across instances? across schemas?
[17:06:47] DEA7TH: has joined #RubyOnRails
[17:06:49] nesQuick: has joined #RubyOnRails
[17:07:24] tubbo: cleopatra: i charge about 15 regards per hour
[17:07:45] tubbo: like every hour you have to send me regards at least 15 times
[17:08:14] adaedra: tubbo: regards
[17:08:26] cleopatra: tubbo, i see
[17:08:43] slash_nick: how much of that does the government get?
[17:08:45] JoshyJosh: aight, newbie question. What are regards?
[17:08:51] slash_nick: JoshyJosh: we don't know :)
[17:09:10] gnotaras: has joined #RubyOnRails
[17:09:26] slash_nick: in this context at least... sounds like currency
[17:09:52] kitsuneyo: has joined #RubyOnRails
[17:09:56] nettoweb: has joined #RubyOnRails
[17:10:06] tubbo: it's the currency of IRC, and how people on IRC get compensated for all the help they have given throughout the years.
[17:10:13] tubbo: we just send regards to each other
[17:10:26] tubbo: it's untaxed because it's a decentralized currency like bitcoin
[17:10:35] cleopatra: I was asking $20 per hour, minimum 4 hours each day
[17:10:58] kitsuneyo: i'm starting to use simple-form. one of my fields has a * before the label, why is that and how do i get rid of it?
[17:11:05] cleopatra: but I do not know what is the project!
[17:11:07] tubbo: kitsuneyo: i think it means it's required
[17:11:11] slash_nick: there are strict regulations preventing us from devaluing the regard
[17:11:52] kitsuneyo: some other fields are required too though tubbo, but they have no *
[17:12:00] tubbo: cleopatra: i've never heard of a minimum hour-per-day requirement. but $20/hour in USD is somewhat low...i remember when i first started out i didn't know how to value myself either, it takes a long time to realize what you're worth and how to charge what you're worth...and an ongoing struggle.
[17:12:12] kitsuneyo: i can't understand why a gem called simple-form would add unwanted things
[17:12:16] tubbo: slash_nick: re-guards.
[17:12:43] tubbo: haha kitsuneyo
[17:12:56] tubbo: i thought this was supposed to be simple!
[17:13:09] gnotaras: hi folks. I should clarify from the beginning that I'm totally clueless about RoR. What I'd like to do is to insert a custom HTTP header in every response to authenticated clients. I believe what I'm looking for is a middleware, which would have the ability to check the client's authentication status and insert the response header.
[17:13:24] worknick: i am using div to store notification. when user clicks, it will give pop up and show notification. how can i make this div and its span not occupy any space on the nav bar ?
[17:13:46] korzybski: has joined #RubyOnRails
[17:13:54] slash_nick: kitsuneyo: as to how to get rid of it, maaaybe this? https://github.com/plataformatec/simple_form/blob/1018e93d11a046857f297cf7769b1f456d52d45b/README.md#i18n
[17:14:00] gnotaras: The application I'm trying to do this to is redmine. Any pointers are greatly apopreciated.
[17:14:14] gnotaras: *appreciated
[17:14:39] durexlw: laterz all
[17:14:40] maxx88: cleopatra: i know some rails guys making $200k in US. on codementor.io some as little as $15/hour
[17:15:04] maxx88: $200k/year, not per hour, although that would be sweet
[17:15:08] kitsuneyo: thanks slash_nick, i found an answer on stack overflow as well
[17:15:22] slash_nick: kitsuneyo: any time :)
[17:15:46] tubbo: gnotaras: in normal cases, middleware would be what you would need to accomplish that. but if you're willing to use the standard http basic auth headers, you can get away with just using rails internal functionality.
[17:16:01] tubbo: check out authenticate_or_request_with_http_basic
[17:16:06] slash_nick: i can't imagine making 200k/year @ 15/hour... my heart would explode
[17:16:13] IanMalcolm: nachoman I did what arup_r_ suggested (since I don't need to enforce the presence of any of those fields) and it worked. Thanks
[17:16:43] tubbo: i'd rather make $200k/hour
[17:16:43] nachoman: :) you're welcome
[17:16:57] JoshyJosh: id like to many any ammount an hour :P
[17:16:59] maxx88: slash_nick: your fingers would be dripping blood on your keyboard
[17:17:47] smathy: Are you suggesting the $200k/yr people are billing just $15/hr? That's 256 hours a week, no?
[17:18:14] kies^: has joined #RubyOnRails
[17:18:37] maxx88: smathy: my bad. $200k/year or as little ast $15/hour, didn’t want to do the math of what $200k equals in per/hour basis
[17:18:51] tubbo: that's the worst car deal ever
[17:19:11] gnotaras: tubbo: thanks, will check that out. Please note that there is no basic auth involved (as far as i can tell). I would like to use the RoR app's intenal method to check the authentication status. What I really don't understand is how to "attach" that code to the application
[17:19:18] slash_nick: maxx88: gotcha...
[17:19:31] cleopatra: First I will see the project specifications ... since i can't use linux I find difficult using rails!
[17:19:39] htmldrum: has joined #RubyOnRails
[17:19:40] gnotaras: tubbo: if there is any example available anywhere, that would be great help
[17:19:47] smathy: I signed up for it a while ago, just to see, but so far the sorts of things people want help with seem tiresome and boring.
[17:19:58] kitsuneyo: what's wrong with this code: config.label_text = lambda { |label, required| "#{label}" }
[17:20:01] cleopatra: thanks for the reply tubbo maxx88
[17:20:08] kitsuneyo: i'm getting wrong number of arguments (3 for 2)
[17:20:18] maxx88: although, the guy making $200k per year is for a SASS company in louisville, ky so, goes farther then other places in the US
[17:20:22] hcnewsom: has joined #RubyOnRails
[17:20:40] gnotaras: i've checked the docs but my ruby and ror iq is zero, so i'm really puzzled.
[17:20:41] JoshyJosh: are any of the variables arrays?
[17:20:41] Papierkorb: kitsuneyo: Look at the stacktrace, that code looks fine. If it's related to that line, you're getting more arguments than your lambda allows.
[17:20:43] pyemkey: has joined #RubyOnRails
[17:21:44] gokul_: has joined #RubyOnRails
[17:21:51] kitsuneyo: it's odd because this works: config.label_text = lambda { |label, required, explicit_label| "#{label}" }
[17:22:02] Papierkorb: kitsuneyo: That's not odd, that's expected
[17:22:07] durexlw: laterz all
[17:22:08] smathy: kitsuneyo, probably because when something else is calling label_text it's sending three args.
[17:22:18] kitsuneyo: i see, ok thanks both
[17:22:29] tubbo: gnotaras: oh i'm sorry i misunderstood...unfortunately i'm not sure how redmine handles authentication.
[17:22:31] Papierkorb: kitsuneyo: lambda and stabby-lambda enforce that the correct amount of parameters are passed
[17:22:38] kitsuneyo: well i got rid of my * now :D
[17:22:49] Papierkorb: kitsuneyo: however, lambdas created with 'proc' or 'Proc.new' do NOT. (That's a ruby quirk)
[17:22:49] gnotaras: tubbo: that's fine. thanks anyway! :)
[17:22:57] kitsuneyo: Papierkorb, i don't even know what lambda means lol
[17:23:09] smathy: kitsuneyo, if you really don't care about the other args just use *, ie. lambda { |label, *| ... }
[17:23:09] Papierkorb: kitsuneyo: I think using a '*' is fine if you really don't care
[17:23:11] tubbo: gnotaras: instead of a rack middleware, i'd advise making a before_action method in your ApplicationController. that way you have access to the session and params.
[17:23:40] stannard: has joined #RubyOnRails
[17:24:53] gnotaras: tubbo: thanks for the pointer. although i do not immediately understand it, something tells me that something like that might be what i'm actually looking for
[17:25:45] tubbo: gnotaras: yup, a before_action does just what it says...runs before the action. and in that method, you can do something like response.headers['X-SUPER-COOL'] = 'absolutely' or something.
[17:26:09] gnotaras: tubbo: that's great. thank you
[17:26:17] corioliss: has joined #RubyOnRails
[17:26:31] JoshyJosh: got a bit of a helper test question if there are any takers?
[17:26:40] arBmind: has joined #RubyOnRails
[17:27:04] smathy: JoshyJosh, !ask
[17:27:04] helpa: JoshyJosh: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
[17:27:11] smathy: Not what I wanted :(
[17:27:21] smathy: Just ask the question, don't ask to ask.
[17:27:21] helpa: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[17:27:25] smathy: There we go :)
[17:27:35] Cache_Money: has joined #RubyOnRails
[17:27:48] JoshyJosh: aight anxiety overdriven x]
[17:27:54] JoshyJosh: http://stackoverflow.com/questions/35482469/testing-link-to-output-in-rails-helper-method?noredirect=1#comment58659662_35482469
[17:28:25] JoshyJosh: basically i need to run a helper test
[17:28:51] JoshyJosh: but I keep getting the same error: ActionController::UrlGenerationError: No route matches {:action=>"index", :direction=>"asc", :sort=>"publish_date"}
[17:30:01] JoshyJosh: ive tried the following code: assert_equal(sortable("publish_date", "Date"), (link_to "Date", {controller: "main_pages"}, proj_list_path(action: "index", direction: "asc", sort: "publish_date")))
[17:30:09] smathy: JoshyJosh, http://guides.rubyonrails.org/testing.html#testing-helpers
[17:31:51] B1n4r10: has joined #RubyOnRails
[17:34:58] smathy: Let me take another look at your code.
[17:34:59] IanMalcolm: is there a way to check (and maybe raise an exception) if all variables in a mail template are present?
[17:36:10] smathy: JoshyJosh, the link_to is line 14?
[17:36:23] htmldrum: has joined #RubyOnRails
[17:37:44] mary5030: has joined #RubyOnRails
[17:38:11] JoshyJosh: smathy: ayup its on line 14
[17:38:51] askhat: has joined #RubyOnRails
[17:39:27] mary5030: has joined #RubyOnRails
[17:42:17] lexileo: has joined #RubyOnRails
[17:43:23] kitsuneyo: what's the best alternative to html.erb (simple html, haml etc) and how easy is it to get started?
[17:44:01] Papierkorb: kitsuneyo: I like HAML the most. It is pretty concise and has tons of features
[17:44:28] kitsuneyo: Papierkorb, i'm just looking at the website, it looks really cool
[17:44:40] kitsuneyo: did it take you a long time to learn?
[17:44:43] htmldrum: has joined #RubyOnRails
[17:44:44] Papierkorb: kitsuneyo: It also takes care of escaping your variables (with the default config that is), so one thing less to forget :)
[17:45:03] kitsuneyo: do you use it on everything now?
[17:45:29] Cache_Money: has joined #RubyOnRails
[17:45:58] Papierkorb: I even wrote a (private) Gem for HAML template introspection. Their internal structures are pretty easy to understand I think
[17:46:29] kitsuneyo: i'm gonna give it a try then, thanks Papierkorb
[17:46:48] kitsuneyo: although not really looking forward to rewriting old views
[17:46:54] Papierkorb: kitsuneyo: Took not too long I think to learn it. I'm pretty happy with the #css.selector esque <div> short-hand, and writing tag-attributes is fun (and easy) too
[17:47:02] flashpoint9: has joined #RubyOnRails
[17:47:19] sbarg: has joined #RubyOnRails
[17:47:21] comm64x: has joined #RubyOnRails
[17:47:23] Papierkorb: kitsuneyo: No need to rewrite stuff without views IMO. But, there's a Erb -> HAML converter gem, but never tried it myself
[17:47:39] Papierkorb: s/without/old/
[17:47:46] Papierkorb: I wonder how that got there
[17:48:25] comm64x: good morning everybody
[17:48:33] JoshyJosh: good mornin
[17:48:36] dsimon: morning comm64x
[17:48:42] kitsuneyo: might look at that gem...
[17:48:58] comm64x: anyone one here have experience using font-awesome with rails
[17:49:07] kitsuneyo: what's with all the hash rockets?
[17:49:13] Papierkorb: comm64x: what about it?
[17:49:22] Papierkorb: kitsuneyo: where?
[17:49:38] kitsuneyo: from the haml site: = render :partial => "sidebar"
[17:49:42] myntcake: has joined #RubyOnRails
[17:50:01] kitsuneyo: couldn't you write that as partial: 'sidebar' ?
[17:50:12] dsimon: oh, hm, does haml even support that syntax?
[17:50:17] comm64x: I need this to be rendered <a href="#"><i class="fa fa-icon"></i>Link</a>
[17:50:20] bronson: has joined #RubyOnRails
[17:50:23] htmldrum: has joined #RubyOnRails
[17:51:01] kitsuneyo: dsimon i dunno, i guess maybe i'm thinking of haml as ruby when it's not
[17:51:02] Papierkorb: kitsuneyo: You can, that's 100% equivalent
[17:51:11] kitsuneyo: ah right ok
[17:51:21] comm64x: I'm using the font-awesome-rails gem
[17:51:28] smathy: JoshyJosh, I'm not sure how to provide the implicit controller context to your helper, I'd switch to using named path helpers in your helper.
[17:51:36] woo: has joined #RubyOnRails
[17:51:47] kitsuneyo: thanks for the help as always, seeyas
[17:52:00] Papierkorb: comm64x: what's your question? Your HTML snippet looks fine?
[17:52:21] baweaver: has joined #RubyOnRails
[17:52:24] comm64x: Thats what I need rendered I dont know how to do it with ERB
[17:52:54] DmitryBochkarev: has joined #RubyOnRails
[17:53:05] comm64x: I've seen a few different ways of doing it but nothing is working for me
[17:53:45] JoshyJosh: smathy, Noted. I'll make some adjustments. Thanks for the help!
[17:54:04] smathy: JoshyJosh, sorry there's not a better option, I thought there was - but I can't find it.
[17:54:23] comm64x: I keep getting syntax errors
[17:54:33] ElFerna: has joined #RubyOnRails
[17:54:44] speaking1ode: has joined #RubyOnRails
[17:55:00] JoshyJosh: smathy, All good. I would rather have an option i can work around than one i can't :]
[17:58:15] htmldrum: has joined #RubyOnRails
[17:58:28] comm64x: can you put any kind of tag with link_to and it come out as <a><tag></tag></a>
[17:58:37] mwcmitchell: has joined #RubyOnRails
[17:59:07] Tref: has joined #RubyOnRails
[18:00:50] smathy: JoshyJosh, +1
[18:01:02] smathy: comm64x, yes.
[18:01:25] smathy: comm64x, !code
[18:01:25] helpa: comm64x: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[18:01:52] xrlabs: has joined #RubyOnRails
[18:02:04] gambl0re: has joined #RubyOnRails
[18:02:04] gambl0re: has joined #RubyOnRails
[18:02:06] netzfisch: has joined #RubyOnRails
[18:03:49] sleungcy: has joined #RubyOnRails
[18:04:19] yellow5: has joined #RubyOnRails
[18:04:27] Tref: Hey guys, this is more a pure ruby question but this room is more active than #ruby so the question is, given an array of any size of records [ [first,last,phone,email], [first,last,phone,email]…] is there a way to find a single record by ‘email’ in 0(1) time?
[18:04:33] arup_r1: has joined #RubyOnRails
[18:05:50] yellow5: tref: you may check out Array#detect
[18:06:20] yellow5: or potentially Array#select
[18:06:21] Tref: yellow5: Detect will search through the entire list until the match is found.
[18:06:33] Tref: so neither of those are 0(1)
[18:06:48] mwcmitchell: has joined #RubyOnRails
[18:07:57] yellow5: tref: i c… was going to suggest maybe Array#bsearch but it's not O(1) either
[18:09:19] hcnewsom: has joined #RubyOnRails
[18:09:41] cnk: has joined #RubyOnRails
[18:10:15] Tref: yeah, I’m beginning to think there’s an issue with the wording of the question
[18:10:20] Tref: this is a coding exercise
[18:10:59] codepete: has joined #RubyOnRails
[18:11:04] stannard: has joined #RubyOnRails
[18:14:02] epochwolf: tref: with an array, I don't know any operation in ruby that's O(1)
[18:14:22] kirillzh: has joined #RubyOnRails
[18:14:38] p1k: epochwolf: push and pop
[18:14:54] epochwolf: p1k: right, queue operations. Derp. :)
[18:15:48] epochwolf: retrieving a hash by key is O(1) but building the hash from an array is O(n)
[18:15:59] epochwolf: And slow, relatively.
[18:16:04] comm64x: Ok here is the gist https://gist.github.com/thomascarterx/07d613fea46d0d855f1c#file-gistfile1-txt
[18:16:04] treaki: has joined #RubyOnRails
[18:17:39] epochwolf: comm64x: link_to(fa_icon("magic", text: "Link"), '#')
[18:18:03] rakm: has joined #RubyOnRails
[18:18:06] epochwolf: Then just stick that into the content_tag as the second parameter. :)
[18:18:23] arup_r1: or link_to '#' { fa_icon("magic", text: "Link"), }
[18:18:37] arup_r1: eh, not the `,` .. it is a typo
[18:18:48] epochwolf: arup___: yeah, you can use a block or the first parameter as the contents. :)
[18:18:58] tomaw: has joined #RubyOnRails
[18:19:04] epochwolf: I tend not to use the block syntax.
[18:19:12] arup_r1: yeah, when you have THICK stuff, use block :p
[18:19:17] srruby: has joined #RubyOnRails
[18:19:34] srruby: Is it OK to still be on Rails3 ?
[18:19:55] arup_r1: epochwolf: why you don't like block syntax ?
[18:19:57] epochwolf: srruby: Not really. It's out of support.
[18:20:12] epochwolf: arup___: I like one liners. :)
[18:20:41] epochwolf: And when you're nesting functions 3 deep, it's easier to read as nested function calls instead of bare code.
[18:20:42] arup_r1: that topic is out of the scope of this channel.. hehe
[18:21:36] cnk: srruby: upgrading sooner rather than later generally makes the upgrades easier - less time for the gems you depend on to change
[18:21:54] epochwolf: srruby: you might want to see this: http://guides.rubyonrails.org/maintenance_policy.html
[18:22:29] epochwolf: srruby: as soon as Rails 5 gets released, 3.2 will no longer recieve security updates.
[18:22:50] epochwolf: Right now it's only getting critical ones.
[18:23:11] smathy: ...although most things are judged as critical :)
[18:23:33] smathy: srruby, just to confirm, you are talking about Rails 3.2 right? Not 3.anything.else?
[18:23:49] epochwolf: ACTION prays it was 3.2
[18:24:22] epochwolf: Does 3.1 still have the xml 0 day exploit?
[18:25:02] lexileo: has joined #RubyOnRails
[18:25:30] arup_r1: ACTION feels lucky. as I started directly from 4.0 :)
[18:25:42] ltd: has joined #RubyOnRails
[18:25:42] machuga: has joined #RubyOnRails
[18:25:44] algernop_k: has joined #RubyOnRails
[18:25:47] pipework: has joined #RubyOnRails
[18:25:47] speakingcode: has joined #RubyOnRails
[18:25:48] rarruda: has joined #RubyOnRails
[18:25:49] gregf: has joined #RubyOnRails
[18:25:51] djellemah_: has joined #RubyOnRails
[18:25:52] mosez: has joined #RubyOnRails
[18:25:53] sunya7a: has joined #RubyOnRails
[18:25:54] universa1: has joined #RubyOnRails
[18:25:55] hinbody: has joined #RubyOnRails
[18:25:55] kitallis: has joined #RubyOnRails
[18:25:55] waseem_: has joined #RubyOnRails
[18:25:57] epochwolf: oh wow... it's been a long time since that. 2.3.15 fixes that.
[18:25:57] dsimon: has joined #RubyOnRails
[18:26:01] weltzooo: has joined #RubyOnRails
[18:26:03] srruby: smathy: Thanks. Yep 3.2
[18:26:03] spion: has joined #RubyOnRails
[18:26:05] tris: has joined #RubyOnRails
[18:26:12] gbailey: has joined #RubyOnRails
[18:26:14] Junaos: has joined #RubyOnRails
[18:26:16] cschneid_: has joined #RubyOnRails
[18:26:17] AntiSpamMeta: has joined #RubyOnRails
[18:26:18] mag42c: has left #RubyOnRails: ()
[18:26:20] epochwolf: srruby: I'd start upgrading to 4.2 now.
[18:26:36] comm64x: epochwolf: thank you soooooo much
[18:26:45] epochwolf: comm64x: you're welcome. :)
[18:26:54] vedu: has joined #RubyOnRails
[18:27:03] sandstrom: has joined #RubyOnRails
[18:27:07] DylanJ: has joined #RubyOnRails
[18:27:17] noodle: has joined #RubyOnRails
[18:27:18] epochwolf: comm64x: next time you can google "rails docs link_to" to find documentation. :)
[18:27:19] TheMoonMaster: has joined #RubyOnRails
[18:27:26] parus_: has joined #RubyOnRails
[18:27:32] null__: has joined #RubyOnRails
[18:27:32] null__: has joined #RubyOnRails
[18:27:34] aep: has joined #RubyOnRails
[18:27:34] targaf: has joined #RubyOnRails
[18:27:35] Liothen: has joined #RubyOnRails
[18:27:36] alexblom: has joined #RubyOnRails
[18:27:36] penguinpowernz: has joined #RubyOnRails
[18:27:36] pydave6367: has joined #RubyOnRails
[18:27:38] ekem: has joined #RubyOnRails
[18:27:38] elaptics: has joined #RubyOnRails
[18:27:40] tfitts: has joined #RubyOnRails
[18:27:40] drbayer: has joined #RubyOnRails
[18:27:43] humd1ng3r: has joined #RubyOnRails
[18:27:43] eljimmy: has joined #RubyOnRails
[18:27:47] epochwolf: If you need any help reading documention, just ask. :)
[18:27:47] cpruitt: has joined #RubyOnRails
[18:27:48] mickey_mouse: has joined #RubyOnRails
[18:27:49] comm64x: yeah I know...I've had a hard time with link_to idk why
[18:27:49] deur-: has joined #RubyOnRails
[18:27:51] g3funk: has joined #RubyOnRails
[18:27:52] Scient: has joined #RubyOnRails
[18:27:54] Dreamer3: has joined #RubyOnRails
[18:27:54] s2013: has joined #RubyOnRails
[18:27:56] hive-mind: has joined #RubyOnRails
[18:27:57] thejoecarroll: has joined #RubyOnRails
[18:28:05] epochwolf: It's okay, learning is a process.
[18:28:12] urbanmonk: has joined #RubyOnRails
[18:28:26] p7r: has joined #RubyOnRails
[18:28:26] DefV: has joined #RubyOnRails
[18:28:35] davidcelis: has joined #RubyOnRails
[18:28:35] davidcelis: has joined #RubyOnRails
[18:28:35] Conflict: has joined #RubyOnRails
[18:28:37] dsimon: tref, to find it in constant time, you'd need to create a hash index in advance
[18:28:37] bahar: has joined #RubyOnRails
[18:28:40] Toledo|gone: has joined #RubyOnRails
[18:28:48] \13k: has joined #RubyOnRails
[18:28:49] arthurnn: has joined #RubyOnRails
[18:28:57] sled: has joined #RubyOnRails
[18:28:57] Tref: dsimon: that’s what I did, I’m benchmarking it now
[18:29:24] dsimon: even then, it's maybe not quite technically constant time because of bucket collision
[18:29:24] bodie_: has joined #RubyOnRails
[18:29:59] Tref: dsimon: Let me know if this looks right to you https://gist.github.com/Tref/f00014c09e269ff025f3
[18:30:14] Tref: dsimon: specifically the find_contact_by_email(email) method
[18:30:18] neanderslob: has joined #RubyOnRails
[18:30:21] melonstorm: has joined #RubyOnRails
[18:30:41] dsimon: tref, in that function, one thing that jumps out is "#{email}"
[18:30:51] dsimon: if email is already a string, then you can just say email
[18:31:07] Tref: @email_index[email]
[18:31:10] Tref: good catch
[18:31:10] D9-: has joined #RubyOnRails
[18:31:10] ur5us: has joined #RubyOnRails
[18:31:18] epochwolf: tref: some thing that bugs me is output to the console in a function. It's better to return a string and then do the console output when you call the function.
[18:31:34] dsimon: epochwolf +1
[18:31:51] Tref: yeah move the puts to the call
[18:31:51] dsimon: treaf, another thing, is that group_by makes the hash values arrays, not individual items
[18:32:11] dsimon: which makes sense given that group_by has to assume there might be more than one record with the same indexed value
[18:32:16] Toledo|gone: has joined #RubyOnRails
[18:32:39] Tref: dsimon: by individual items you mean ruby objects?
[18:32:53] Tref: dsimon: so are you saying that group_by is good or bad?
[18:32:58] dsimon: tref, in this case, i mean csv rows
[18:33:16] Hans267: has joined #RubyOnRails
[18:33:17] Tref: well Im converting them to Contact instances
[18:33:29] dsimon: oh, so you are
[18:34:21] dsimon: regardless, find_contact_by_email is making an incorrect assumption about what kind of data is found in @email_index
[18:34:24] IFrank00: has joined #RubyOnRails
[18:34:53] nachoman: how rails resolve assets internally?
[18:34:55] Tref: dsimon: ok, what’s that assumption
[18:35:07] mojo091: has joined #RubyOnRails
[18:35:12] Tref: dsimon: that there can be duplicate emails?
[18:35:40] dsimon: it assumes @email_index[x] returns a single contact
[18:35:45] dsimon: but actually it will return an array
[18:36:02] dsimon: (or else i suppose you could rename the method to find_contacts_by_email)
[18:36:40] chipotle: has joined #RubyOnRails
[18:36:43] Tref: dsimon: technically it would be best to return a Contact objcet
[18:36:56] Tref: but at the end of the day all I need to return is that data
[18:37:01] Tref: the string data of the values
[18:37:31] dsimon: it's returning an array of contacts right now
[18:37:48] dsimon: e.g. [Contact, Contact, ...]
[18:38:46] dsimon: if you want to assume that there will only be one Contact for a given email, then you should maybe map @email_index through a function that just returns the first item in the value array for each key
[18:38:52] nesQuick_: has joined #RubyOnRails
[18:39:19] dsimon: e.g. @email_index = @contacts.group_by(&:email).map(&:first)
[18:39:24] _bogus_: has joined #RubyOnRails
[18:39:52] dsimon: by the way &:something is short for {|x| x.something}
[18:40:05] dsimon: for block arguments
[18:40:56] Tref: dsimon: yeah I know how the sym#to_proc works
[18:40:59] mojo091: iw as just about to ask about &:something. is that a ruby thing or a rails thing?
[18:41:26] Tref: mojo091: http://blog.thoughtfolder.com/2008-02-25-a-detailed-explanation-of-ruby-s-symbol-to-proc.html
[18:41:37] _Tariq: has joined #RubyOnRails
[18:41:47] dsimon: oh, actually, my suggested code won't work
[18:41:51] Tref: dsimon: that method is just going to return email addresses
[18:42:03] dsimon: tref, no, that's not why it won't work
[18:42:25] dsimon: it won't work because Hash#map is over [k,v] pairs, not just values
[18:42:37] ziyadb: has joined #RubyOnRails
[18:43:24] Pazician: has joined #RubyOnRails
[18:43:28] Tref: right, I dont think you can to_proc tha
[18:43:46] kirillzh: has joined #RubyOnRails
[18:43:57] bronson: has joined #RubyOnRails
[18:44:04] Tref: dsimon: im not sure what your thinking is with .map(&:first)
[18:44:37] dsimon: right now, @email_index is like {"a@b" => [Contact(...)], "c@d" => [Contact(...)]}
[18:45:13] jtong_: has joined #RubyOnRails
[18:45:15] Tref: i was thinking of just creating an empty hash and doing this
[18:45:16] Tref: @email_index = @contacts.map{|c| @email_index[c.email] << c }
[18:45:30] Tref: @email_index = @contacts.map{|c| @email_index[c.email] = c }
[18:45:33] dsimon: tref, you wouldn't use map for that
[18:45:47] Tref: whys that
[18:45:49] dsimon: because map returns a new array
[18:46:39] dsimon: but you want to go through each item in @contacts and do an individual thing with each item
[18:46:47] dsimon: so you would just use .each{|c| ... }
[18:46:51] dsimon: or a regular for loop
[18:48:42] dtordable: has joined #RubyOnRails
[18:49:34] nachoman: there is a way to change the assets load-path in runtime?
[18:49:58] _Tariq: has joined #RubyOnRails
[18:50:28] jottr: has joined #RubyOnRails
[18:50:33] matthewd: nachoman: What are you trying to achieve?
[18:51:55] _djbkd: has joined #RubyOnRails
[18:52:38] eljimmy: has joined #RubyOnRails
[18:52:55] nachoman: switching between different paths for assets, depending on a query or subdomain
[18:53:46] nachoman: maybe could be possible by having many instances of sprockets?
[18:54:23] intrigueD: has joined #RubyOnRails
[18:54:48] AzaToth: has joined #RubyOnRails
[18:56:19] jottr: has joined #RubyOnRails
[18:57:37] herminiotorres: has joined #RubyOnRails
[18:57:55] speaking1ode: has joined #RubyOnRails
[18:59:12] htmldrum: has joined #RubyOnRails
[19:02:32] _bogus_: hi there... i have to create a long form for a model where the user can save his incomplete form to fill the rest later if needed... is there a gem to do this, or whats the best approach for doing so?
[19:03:07] fryguy: _bogus_: http://garlicjs.org/\
[19:05:22] netzfisch: has joined #RubyOnRails
[19:05:42] y2mq37: has joined #RubyOnRails
[19:05:55] Deck`: has joined #RubyOnRails
[19:06:04] _bogus_: fryguy, but this is locally stored, right? i mean, i need something that's stored temporarily on the server....
[19:06:21] pawnbox: has joined #RubyOnRails
[19:06:45] matthewd: nachoman: You can't really vary the path, because that'd interfere with precompile's ability to find all the things
[19:06:59] _bogus_: i mean... whenever the user logs into the system he gets his form, even if it's incomplete
[19:06:59] foli_: has joined #RubyOnRails
[19:07:28] nachoman: I'm trying to create a multitenant app where each tentant is an engine; is almost complete, but rails by default responds with the assets found in the main asset path and then continues looking in the engine paths.. ok matthewd :(
[19:07:37] kirillzh: has joined #RubyOnRails
[19:07:44] matthewd: nachoman: I think you'd need to put the variable part into the asset name: app/assets/stylesheets/site1/application.css
[19:08:36] tildes: has joined #RubyOnRails
[19:09:04] baweaver: has joined #RubyOnRails
[19:11:11] nachoman: Ok thank you matthewd, I think that this should do the work for now :)
[19:11:54] jeanlinux: has joined #RubyOnRails
[19:14:52] jottr: Hi guys and gals. Maybe someone in here can help with a question I posted on stackoverflow? https://stackoverflow.com/questions/35507297/how-to-deploy-a-rails4-app-to-heroku-with-ssl-cert-cloudflare-cloudfront-and-s
[19:15:04] emachnic: has joined #RubyOnRails
[19:15:15] comm64x: has left #RubyOnRails: ()
[19:15:26] jottr: I'm unsure if I should use cloudflare in conjunction with cloudfront or not.
[19:16:01] balexand_: has joined #RubyOnRails
[19:16:39] fryguy: jottr: probably not
[19:17:36] jottr: fryguy: Do you have experience deploying to heroku?
[19:18:03] fryguy: jottr: no
[19:18:10] fryguy: i build my own servers usually
[19:18:40] htmldrum: has joined #RubyOnRails
[19:19:15] naftilos76: has joined #RubyOnRails
[19:19:20] nickjj: has joined #RubyOnRails
[19:21:06] balexand_: has left #RubyOnRails: ()
[19:21:39] Bryan: has joined #RubyOnRails
[19:23:03] Guest71056: has left #RubyOnRails: ()
[19:23:05] Guest71056: has joined #RubyOnRails
[19:23:08] Guest71056: has left #RubyOnRails: ()
[19:23:20] Guest71056: has joined #RubyOnRails
[19:23:23] Guest71056: has left #RubyOnRails: ()
[19:23:47] bryyy: has joined #RubyOnRails
[19:23:48] c0defeed: I am trying to return to an Edit form after submitting an update, but the edit screen gets loaded with the old value instead of the new updated value. Any suggestions?
[19:24:22] intrigueD: c0defeed: post a gist of your code
[19:24:34] rubyonrailed: has joined #RubyOnRails
[19:25:48] rubyonrailed: Does anyone have experience with bootstrap switch? It will not send off my update request, but when I remove `bootstrapSwitch()` it works normally. https://gist.github.com/JasonMannon/ac05e3a49b15bea00e51
[19:26:15] htmldrum: has joined #RubyOnRails
[19:28:12] c0defeed: intrigueD, the problem is that controller#show returns before controller#update commits. Too much stuff to post in a gist. Is there a way to make controller#update delay the return of a response until the commit has completed?
[19:29:53] jeanlinux: has joined #RubyOnRails
[19:31:14] drbayer: has joined #RubyOnRails
[19:32:13] itsmeduncan: has joined #RubyOnRails
[19:33:09] flappynerd: has joined #RubyOnRails
[19:33:17] B1n4r10: has joined #RubyOnRails
[19:34:28] stannard: has joined #RubyOnRails
[19:35:47] Macaveli: has joined #RubyOnRails
[19:36:01] srruby: has joined #RubyOnRails
[19:36:35] pawnbox: has joined #RubyOnRails
[19:37:00] safetypin: has joined #RubyOnRails
[19:41:48] arashb: has joined #RubyOnRails
[19:42:30] sled: has joined #RubyOnRails
[19:43:17] _bogus_: has joined #RubyOnRails
[19:44:07] c0defeed: Figured it out; I was making a call to controller#show too early in my AJAX. Needed to wrap the call in a function(){}
[19:47:31] cleopatra: has joined #RubyOnRails
[19:48:31] benlieb: has joined #RubyOnRails
[19:49:08] manfrin: has joined #RubyOnRails
[19:50:12] gnotaras: has left #RubyOnRails: ()
[19:51:58] andrewvos: has joined #RubyOnRails
[19:52:29] atrius: has joined #RubyOnRails
[19:52:57] jeanlinux: has joined #RubyOnRails
[19:53:02] lemur: has joined #RubyOnRails
[19:53:12] FernandoBasso: has joined #RubyOnRails
[19:58:52] mdw: has joined #RubyOnRails
[19:59:08] speaking1ode: has joined #RubyOnRails
[20:00:10] oniMaker: has left #RubyOnRails: ("Peace")
[20:02:17] Pumukel: has joined #RubyOnRails
[20:03:12] hcnewsom: has joined #RubyOnRails
[20:04:54] hekin: has joined #RubyOnRails
[20:05:44] voobscout: has joined #RubyOnRails
[20:07:57] Deck`: has joined #RubyOnRails
[20:09:28] Google: has joined #RubyOnRails
[20:10:28] JohnnyR030T: has joined #RubyOnRails
[20:10:55] Liothen: has joined #RubyOnRails
[20:11:26] _bogus_: has joined #RubyOnRails
[20:12:10] milesmatthias: has joined #RubyOnRails
[20:13:04] Devalo: has joined #RubyOnRails
[20:13:09] _Tariq: has joined #RubyOnRails
[20:14:52] Cache_Money: has joined #RubyOnRails
[20:16:12] kmckelvin: has joined #RubyOnRails
[20:21:34] yfeldblum: has joined #RubyOnRails
[20:22:40] McMasterpants: has joined #RubyOnRails
[20:23:17] jeanlinux: has joined #RubyOnRails
[20:25:00] tildes: has joined #RubyOnRails
[20:25:45] McMasterpants: Is it possible to create a section in a rails app by creating a subfolder in the app directory? Like this: app/admin/controllers
[20:26:19] McMasterpants: It would also contain the models and views. Basically the same directory structure as the standard /app directory
[20:26:22] zeknox: are there any currently maintained gems for in place editing?
[20:26:24] fox_mulder_cp: McMasterpants: use routes, Luke
[20:26:42] McMasterpants: Yeah, I know I can create this "area" using routes
[20:26:42] fox_mulder_cp: zeknox: what u mean by 'in place editing'?
[20:26:55] zeknox: something similar to rest_in_place
[20:26:58] fox_mulder_cp: McMasterpants: scope?
[20:27:13] fox_mulder_cp: zeknox: hmm.. i don't know u, sorry
[20:27:15] McMasterpants: I want to actually organize the directory structure this way
[20:27:28] McMasterpants: Is that possible?
[20:27:51] fox_mulder_cp: McMasterpants: u can. i agree :)
[20:27:59] godzillaenlacasa: So, I just switched from using URI to submit a json hash (which was working), to HTTParty, now I getting an error which I don't understand: {"error"=>"Required parameter, \"device\", was not sent."}
[20:28:14] godzillaenlacasa: I mean, I get what the error is saying... device is missing. However not sure why
[20:28:20] McMasterpants: fox_mulder_cp: I'm confused by your response. I don't know HOW to get this to work
[20:28:34] McMasterpants: fox_mulder_cp: Also, is your sn from X-Files?
[20:28:39] chipotle: has joined #RubyOnRails
[20:28:49] fox_mulder_cp: McMasterpants: read about resources and scopes.
[20:29:17] fox_mulder_cp: McMasterpants: yes. ~20 years my friend said me, that i'm like a D.Duchovny
[20:30:46] cnk: McMasterpants: Organizing your file structure in that way is possible but will be a lot of work if you are not an experienced Rails person. If you really want things organized so models, controllers and views for a feature are in the same directory, look into rails engines
[20:31:19] McMasterpants: cnk: I'm experienced. Just wasn't having much luck googling.
[20:31:32] McMasterpants: cnk: I'll take a look at it
[20:31:37] McMasterpants: cnk: Thank you
[20:31:48] fox_mulder_cp: McMasterpants: rails app directory structure is a standart convention
[20:32:09] askhat: has joined #RubyOnRails
[20:32:26] smathy: zeknox, no idea about gems, I just use this: https://plugins.jquery.com/jinplace/
[20:32:51] McMasterpants: fox_mulder_cp: Yup, I just wanted to see if I could do it. I have a large app ahead of me that I wanted to split up. I may just make several applications though
[20:32:58] zeknox: smathy: thanks man, ill check it out
[20:33:42] fox_mulder_cp: McMasterpants: i don't really true, but u can relocate your apps into app && and suv apps includes
[20:34:20] fox_mulder_cp: i can't touch this doc's, but u may use one app as sub-app for second app
[20:34:39] McMasterpants: fox_mulder_cp: I'm sorry, your english grammar is making it hard to understand you.
[20:34:46] fox_mulder_cp: my english is not native language
[20:35:15] fox_mulder_cp: McMasterpants: ok. i try to google keywords now
[20:35:19] McMasterpants: fox_mulder_cp: Вы говорите?
[20:35:41] andrewvos: has joined #RubyOnRails
[20:36:01] McMasterpants: fox_mulder_cp: Ar tai geriau?
[20:36:21] pawnbox: has joined #RubyOnRails
[20:36:43] ur5us: has joined #RubyOnRails
[20:36:57] fox_mulder_cp: McMasterpants: russian
[20:37:30] McMasterpants: fox_mulder_cp: Отлично.
[20:38:04] McMasterpants: fox_mulder_cp: за помощь. Я должен идти.
[20:38:12] McMasterpants: fox_mulder_cp: Спасибо за помощь. Я должен идти.
[20:38:43] fox_mulder_cp: McMasterpants: be carefull
[20:38:47] benlieb: I'm trying to write a filter script for Vim that will execute lines in my editor in a rails context. So far this kind of works: puts `bundle exec rails runner "#{STDIN.read}"`
[20:38:56] benlieb: but multiline input and some other input chokes
[20:39:02] benlieb: any suggestions on making it better
[20:39:50] milesmatthias: has joined #RubyOnRails
[20:40:05] benlieb: fore example filtering this line: puts 'MyVarHumpack'.underscore
[20:40:16] benlieb: produces my_var_humpack
[20:40:26] srruby: has joined #RubyOnRails
[20:41:04] benlieb: but this produces a syntax error: %w(sdf ssdf d dfdss sdfs).collect{|x| puts "#{x} text" }
[20:41:43] guacamole: has joined #RubyOnRails
[20:46:27] ppinkerton: has joined #RubyOnRails
[20:47:19] theblang: has joined #RubyOnRails
[20:47:26] rubyonrailed: I'm using the `twitter-bootstrap-rails` gem and it's loading the Bootstrap CSS after another stylesheet I would like to load last. How can I change the load order?
[20:51:40] cnk: probably in your application.css file - how are you including the twitter bootstrap stuff?
[20:52:56] godzillaenlacasa: So if I have this in my controller: params.require(:device).permit(:serial_number), and my JSON hash is only passing serial_number (I'm doing a setter with the params[:serial_number], HTTParty is kicking back an error because I didn't set :device. Why?
[20:53:34] godzillaenlacasa: my route actually contains the serial number /v1/devices/#{serial_number}
[20:53:45] johnflux: has joined #RubyOnRails
[20:53:46] johnflux: has joined #RubyOnRails
[20:54:14] smathy: godzillaenlacasa, because you've told it to require :device and you're not providing that.
[20:54:23] mois3x: has joined #RubyOnRails
[20:54:49] smathy: godzillaenlacasa, first sentence says it all really: http://devdocs.io/rails/actioncontroller/parameters#method-i-require
[20:55:03] godzillaenlacasa: @smathy so I just ported over from 'uri' to HTTParty, the request was working
[20:55:35] zeknox: smathy: do you know how to make jinplace send an http put/patch instead of the default post?
[20:55:36] srruby: Is it considered bad practice to make database calls within views ?
[20:55:47] slash_nick: srruby: yeah
[20:55:52] smathy: godzillaenlacasa, ok, so something changed between then and now. Either you were providing it before, or not requiring it before.
[20:55:59] srruby: slash_nick: Thanks.
[20:56:44] godzillaenlacasa: @smathy I literally haven't changed a thing on the RoR side... remote side, just ported my JSON hash into an HTTParty.patch request
[20:57:45] slash_nick: godzillaenlacasa: weak imagination ehre... any chance you could put some of that into a gist? what are you sending, what's the response, etc
[20:58:00] godzillaenlacasa: @slash_nick yeah, on sec
[20:58:14] baweaver: has joined #RubyOnRails
[20:59:22] smathy: zeknox, it's hard coded to POST: https://github.com/itinken/jinplace/blob/master/js/jinplace.js#L432 You'll need to provide your own submitFunction if you want to use something different.
[21:00:07] zeknox: smathy: thats kinda lame considering it wont work with a default resource route in rails, amiright?
[21:01:14] smathy: zeknox, it's just JS in your repo, change it to whatever you want.
[21:01:27] smathy: zeknox, they call it SOFTware for a reason ;)
[21:01:48] zeknox: smathy: touche my friend, thanks, sometimes the obvious doesn't show itself until you mention it like that...
[21:02:32] mhoungbo: has joined #RubyOnRails
[21:02:34] smathy: zeknox, heh, no problem man. I agree btw, it's always confused me why they didn't make a data-method option.
[21:03:04] smathy: (and always been too easy for me to change to bother about sending a pull request :)
[21:07:22] baweaver: has joined #RubyOnRails
[21:08:18] godzillaenlacasa: @slash_nick here you go: https://gist.github.com/godzilla74/26bbeb2e386fbefef5dd
[21:08:55] Deck`: has joined #RubyOnRails
[21:09:46] blackmesa: has joined #RubyOnRails
[21:10:58] slash_nick: godzillaenlacasa: look closely here https://gist.github.com/godzilla74/26bbeb2e386fbefef5dd#file-gistfile1-txt-L84
[21:11:12] slash_nick: godzillaenlacasa: your parameters are not being processed into a params hash. what version of rails are you on?
[21:11:49] godzillaenlacasa: @slash_nick 4.1.7
[21:11:56] slash_nick: Parameters: {"{ your medium sized params hash here is still in json format }" => nil, ... }
[21:12:27] zeknox: smathy: do you have an example of how you modify the span tags within the html to send properly with strong_params in rails?
[21:12:40] godzillaenlacasa: @slash_nick oh, you're right...
[21:12:41] slash_nick: godzillaenlacasa: are you specifying a content type header on your request?
[21:13:19] godzillaenlacasa: response = HTTParty.patch("#{get_host_url}/v1/devices/#{get_serial_number}.json", body: { device: @data }) should fix it
[21:13:28] slash_nick: godzillaenlacasa: lemme know :)
[21:13:37] godzillaenlacasa: @slash_nick thanks for the extra eyes
[21:13:40] slash_nick: hoorah... you just needed my eyes
[21:13:53] godzillaenlacasa: 4 are better than 3
[21:14:13] slash_nick: godzillaenlacasa: oh no... i'm afraid we only amount to 2
[21:14:20] slash_nick: ;) just kidding i have two eyes
[21:14:25] smathy: godzillaenlacasa, the params[:serial_number] is coming from the URL which is being used in set_device so never needed to be in a :device sub-hash.
[21:14:42] flappynerd: has left #RubyOnRails: ("Leaving")
[21:14:56] smathy: godzillaenlacasa, I think you were always getting this error, but never noticed because you were ignoring the response in the URI version.
[21:16:04] godzillaenlacasa: @smathy actually you raise an interesting point... I'm not setting the serial_number on the client end...
[21:16:13] dopie: smathy: do you use vim?
[21:16:18] timdotrb: has joined #RubyOnRails
[21:16:34] timdotrb: Afternoon, all
[21:16:35] godzillaenlacasa: @smathy yet it's still being sent as a paramter.
[21:16:42] smathy: dopie, yes.
[21:16:54] smathy: godzillaenlacasa, Rails just parses the URL and puts it into params
[21:16:57] smathy: godzillaenlacasa, that's normal.
[21:17:06] godzillaenlacasa: @smathy oh, makes sense
[21:17:39] smathy: godzillaenlacasa, my point is that you wouldn't have seen this error in your old code, but if you were still using the `update(device_params)` code then it would NOT have been updating anything.
[21:17:39] dopie: smathy: quick question in VIM i know I can make the beginning and end blocks are by using % .. what would I use to highlight the beginning or end of a block in a different color
[21:18:06] kirillzh: has joined #RubyOnRails
[21:20:09] ElFerna: has joined #RubyOnRails
[21:20:26] Toledo|gone: has joined #RubyOnRails
[21:22:08] smathy: dopie, in vim type :help syntax and start reading.
[21:24:10] roshanavand: has joined #RubyOnRails
[21:25:36] momomomomo: has joined #RubyOnRails
[21:26:22] pawnbox: has joined #RubyOnRails
[21:27:06] doublemalt__: has joined #RubyOnRails
[21:28:32] baweaver: has joined #RubyOnRails
[21:28:33] timdotrb: Is there something in Rails that blocks remote images by default? I’m attempting to show a Facebook profile picture, and when I copy the image tag into an HTML file, it shows just fine. When I paste the code into my Rails view, nothing appears.
[21:29:13] smathy: timdotrb, no.
[21:29:24] rafaelfranca: has joined #RubyOnRails
[21:29:28] roshanavand: has joined #RubyOnRails
[21:34:45] mhoungbo: has joined #RubyOnRails
[21:40:02] intrigueD: has joined #RubyOnRails
[21:41:09] codepete: has joined #RubyOnRails
[21:44:17] bhowe: has joined #RubyOnRails
[21:49:40] Cohedrin: has joined #RubyOnRails
[21:50:36] bahar: has joined #RubyOnRails
[21:52:40] matthias_: has joined #RubyOnRails
[21:52:54] allcentury: has joined #RubyOnRails
[21:53:10] Aherin: has joined #RubyOnRails
[21:53:47] Cache_Money: has joined #RubyOnRails
[21:53:49] flashpoint9: has joined #RubyOnRails
[21:54:57] kies^: has joined #RubyOnRails
[21:55:02] dopie: https://gist.github.com/staycreativedesign/00ac684dc4f1756ace05
[21:55:06] dopie: why is my test failing?
[21:56:54] sarink: has joined #RubyOnRails
[21:58:03] trinaldi: has joined #RubyOnRails
[21:58:11] wmdrossard: has joined #RubyOnRails
[21:58:24] drbayer: has joined #RubyOnRails
[21:59:00] futilegames: has joined #RubyOnRails
[21:59:35] sleungcy: has joined #RubyOnRails
[21:59:39] ppinkert_: has joined #RubyOnRails
[22:00:24] cnk: dopie: not sure. What is the 'user: jim' param doing?
[22:00:35] dopie: isnt it setting the user?!
[22:00:41] cnk: seems odd that you have an explicit user parama, and then use current_user
[22:01:29] cnk: I suspect you do not want params.requre(:user) at all
[22:01:35] cnk: but not sure what you are doing
[22:01:50] ppinkert_: has joined #RubyOnRails
[22:02:36] cnk: and given that you are constructing hash yourself, I don't think .permit(hash) buys you anything
[22:03:16] kallisti5: so... coffee scripts are compiled and loaded on every controller view?
[22:03:38] cnk: as in recompiled? in dev mode, yes
[22:03:45] cnk: but not in production
[22:04:06] kallisti5: ex.. I was expecting something done in app/assets/javascript/bob.coffee to show up in /bobs but not /janes
[22:04:27] kallisti5: atm it seems like all the coffees are in all the controlers :-|
[22:05:53] mhoungbo: has joined #RubyOnRails
[22:06:03] sleungcy: Hi, is there a convention on where to put Non-AR models?
[22:06:10] benlieb: has joined #RubyOnRails
[22:06:28] sleungcy: do I put them under app/model along with all the AR models?
[22:06:36] cnk: kallisti5: I would read the guide on asset pipeline. You may be able to do that sort of individual include
[22:06:43] smathy: sleungcy, no convention, but many of us do that - yes.
[22:06:54] cleopatras: has joined #RubyOnRails
[22:07:31] kallisti5: cnk: oooohhh.
[22:07:33] sleungcy: Is it messy doing that. I already have 20+ models all inside the same folder app/model
[22:07:40] kallisti5: cnk: application.coffee loads em' all, doesn't it?
[22:07:57] cnk: in the default config, yes
[22:08:25] Haydos: has joined #RubyOnRails
[22:08:35] cnk: sleungcy: you could put them somewhere else and then configure Rails to load an additional directory
[22:08:36] smathy: sleungcy, the messy part is NOT putting them in that directory and introducing namespace clashes :)
[22:09:04] smathy: sleungcy, if you have 20+ models all at the top level of `app/models` then maybe you should fix that, regardless of where your non-AR models go.
[22:10:01] Deck`: has joined #RubyOnRails
[22:10:10] _djbkd: has joined #RubyOnRails
[22:12:41] mehtad: has joined #RubyOnRails
[22:12:48] mehtad: has left #RubyOnRails: ()
[22:12:50] hcnewsom: has joined #RubyOnRails
[22:13:06] sleungcy: how do i fix that?
[22:13:14] chouhoul_: has joined #RubyOnRails
[22:13:16] sleungcy: do i just put everything into namespaces?
[22:13:26] veloutin: has joined #RubyOnRails
[22:14:40] smathy: sleungcy, usually you will still have some things at the root level, but yes - basically - you segment your models into logically distinct groups/namespaces.
[22:14:44] chouhoul_: has joined #RubyOnRails
[22:18:23] robbyoconnor: has joined #RubyOnRails
[22:19:08] momomomomo: has joined #RubyOnRails
[22:21:55] ur5us: has joined #RubyOnRails
[22:22:03] ur5us: has joined #RubyOnRails
[22:23:53] Technodrome: has joined #RubyOnRails
[22:23:54] yfeldblum: has joined #RubyOnRails
[22:24:02] Technodrome: anyone know a way to have django like migrations in rails?
[22:24:50] jeanlinux: has joined #RubyOnRails
[22:25:09] mhoungbo: has joined #RubyOnRails
[22:26:48] mojo091: has joined #RubyOnRails
[22:27:10] lexiMon: has joined #RubyOnRails
[22:28:27] baweaver: use django?
[22:29:49] havenwood: Django migrations are very Django-like.
[22:30:12] ppinkerton: has joined #RubyOnRails
[22:30:24] bronson: Technodrome: what parts of django migrations do you want?
[22:30:52] jeanlinux: has joined #RubyOnRails
[22:30:54] Technodrome: i know i know
[22:31:01] Technodrome: i just miss my single model file with fields, and then running migrate
[22:31:15] Technodrome: having to create a new migration for every alter or change is just sorta annoying, i wish it was done for me
[22:31:47] baweaver: you'd basically be reinventing the entire pipeline to do so.
[22:32:05] baweaver: idempotency would not be cheap.
[22:32:31] bronson: actually, I did a proof of concept of that back in 2012: https://github.com/bronson/richfield
[22:32:46] Technodrome: I understand, its just one feature of django i really like, i have a feeling before i'm done with this project, i'll go back and just merge everything into one migration file, i dont need every mistake or every small change, to be a new migration
[22:32:51] bronson: still works in Rails 5. Gotta say, I really like it.
[22:33:12] hcnewsom: has joined #RubyOnRails
[22:33:34] bronson: Ran into the problem of guessing renames, etc, and ran out of time.
[22:33:35] Technodrome: https://github.com/pjhyett/auto_migrations
[22:33:40] Technodrome: i notice there is this as well
[22:33:59] Radar: Technodrome: When I learned Rails I tried writing PHP code in Rails
[22:34:03] Radar: Turns out, not a wise move
[22:34:03] sleungcy: has joined #RubyOnRails
[22:34:12] Radar: seems like you're doing the same but it's with django
[22:34:29] gokul__: has joined #RubyOnRails
[22:34:36] Technodrome: well this is the only feature i'm like, maybe a django way would be better
[22:34:40] bronson: I found auto_migrations to guess wrong a lot. Doesn't save any time.
[22:34:42] Technodrome: http://gilesbowkett.blogspot.com/2007/11/always-use-automatic-migrations.html
[22:34:49] Technodrome: this guy shares a similar narrative
[22:34:58] Technodrome: hmm shameful bronson
[22:35:05] Radar: from 2007
[22:35:14] garylabronz: has joined #RubyOnRails
[22:35:26] garylabronz: can you have active record duplicate writes to another database?
[22:35:35] Radar: p.s. it's called Rails because you should stay on the tracks.
[22:35:39] Radar: garylabronz: Sounds like you want replication.
[22:36:03] garylabronz: yes i do, but i am unable to replicate from my current soure
[22:36:20] bronson: Giles is full of questionable advice presented as strident facts.
[22:36:25] garylabronz: i am wanting to minimize downtime, but at this stage i am forced to dump, then restore
[22:36:26] bronson: Take anything he says with a lot of salt.
[22:39:31] bronson: Goldangit, I never got around to documenting Richfield since I never wanted anyone to use it.
[22:39:52] duncannz: has joined #RubyOnRails
[22:40:03] bronson: Since it survived the Rails4->Rails5 transition with zero pain, I guess it's more stable than I'd thought.
[22:40:20] smathy: Technodrome, that article really demonstrates a lack of understanding of Rails and best practices.
[22:40:52] duncannz: has joined #RubyOnRails
[22:40:53] bronson: One of these days I need to finish it. Basically you put a 'fields do; string :name ... end' to define all your models' columns.
[22:41:09] bronson: then you run 'rails generate migration' and it write the migration for you.
[22:41:18] bronson: if it gets anything wrong, you just fix it before migrating.
[22:43:28] bronson: "you're back in the pre-Ant and pre-Rake days of manual builds and spending all day, or several days, just getting a database working." <-- uh huh. Pull the other one Giles.
[22:44:02] kallisti5: cnk: almost set, now turbolinks is giving me hell :-\
[22:44:04] kallisti5: https://gist.github.com/avongluck-r1soft/0fb97119880a51f59693
[22:44:14] kallisti5: I thought that would solve the turbolinks issue, but no love
[22:44:24] kallisti5: any thoughts?
[22:44:54] mickey_mouse_2: has joined #RubyOnRails
[22:45:09] Technodrome: smathy i'll get over it :)
[22:45:10] superlou: has joined #RubyOnRails
[22:45:20] Technodrome: Radar and php in rails is just crazy, i'm not that crazy :)
[22:45:26] jeanlinux: has joined #RubyOnRails
[22:45:39] Technodrome: i do just miss having all my field types in one place, migration after migration does get sloppy
[22:46:44] smathy: Technodrome, db/schema.rb is just about as "in one place" as it gets.
[22:46:46] Radar: You'll learn to love Rails migrations when it's not just you working on a project.
[22:46:54] Radar: i.e. when it's a team of > 1 developer
[22:47:16] Radar: like, for instance, my workplace which has 10 devs who can possibly alter the same table at the same time on any given day.
[22:47:57] Technodrome: Radar everyone is working locally right?
[22:48:05] Radar: Technodrome: I mean when the migrations reach prod
[22:48:17] Radar: Also: the field listing doesn't allow for you to rename columns in an efficient manner. In production, when you rename a column on the production database, you MAY have instances still depending on that old column.
[22:48:18] Technodrome: yeah but there would be testing on the test instance right?
[22:48:27] Technodrome: 10 people on one project, must be a large project!
[22:48:27] Radar: Technodrome: Lemme finish.
[22:48:54] Radar: The right way to do it is to create a new column, copy the data from the old column to the new column, deploy that change, THEN deploy a new change which references the new column and drops the old column.
[22:49:00] Radar: auto_migrations won't do that for you.
[22:50:01] Radar: 10 people is not a large project. I know realestate.com.au has > 100 devs
[22:50:06] smathy: There are many things auto_migrations won't let you do.
[22:50:09] Radar: groupon was about that size too before it died.
[22:50:14] Radar: livingsocial as well
[22:50:14] pawnbox: has joined #RubyOnRails
[22:50:21] bronson: heck, for any project that wants zero downtime, every db change needs to be done in two steps.
[22:50:28] bronson: (and that should be every project)
[22:50:31] smathy: Not every.
[22:50:42] bronson: smathy: * other than the most trivial
[22:50:43] Radar: "not all DB changes"
[22:50:45] duncannz: What's the best way to host multiple rails apps on a VPS? open to either apache or nginx. Each site is pretty low traffic, and with my current setup (passenger, nginx) it seems to take a fixed amount of RAM for each site, even the very low traffic ones
[22:50:48] Radar: good chatting. bbl.
[22:51:05] trinaldi: has joined #RubyOnRails
[22:51:13] duncannz: actually if anything I might switch to apache because it seems easier to use lets encrypt on it, and then I can put everything on https
[22:51:26] B1n4r10: has joined #RubyOnRails
[22:52:07] garylabronz: i run nginx in front of docker containers on my $5 DO box
[22:52:45] Ergo: has joined #RubyOnRails
[22:52:50] garylabronz: with a git remote & post recieve so i can trigger a new container build when i update the codebase
[22:53:06] bronson: yea, I have an nginx reverse proxy to multiple VMs on a 1GB vps. Not real enthused by it.
[22:53:22] bronson: one app gets a memory leak, all apps get sick.
[22:53:22] garylabronz: multiple vm's on a 1gb VPS?
[22:53:34] garylabronz: containers != VM
[22:53:45] garylabronz: and sure, but thats the application not the host
[22:54:03] garylabronz: if you deploy dodgy code on a beefy machine it will still suck
[22:54:04] bronson: sorry, lxc containers. I also have a dedicated box with VMs and 8GB, that works great.
[22:55:05] bronson: yep. I don't have a lot of control over the code (lot of it getting written in Singapore) so... fml. :)
[22:55:22] bronson: I do what I can to keep it clean.
[22:56:01] bronson: ANYHOW: VPSes are so cheap, I'm not sure it's ever worth running more than one app per box.
[22:56:25] hahuang65: has joined #RubyOnRails
[22:56:56] smathy: I always grab a fresh VPS for each app.
[22:56:57] bronson: Maybe if your VPS is bigger than 4GB and your containers allow hard memory limits.
[22:57:51] safety_cut: has joined #RubyOnRails
[22:58:26] Tref: has joined #RubyOnRails
[22:58:50] openstruct: has joined #RubyOnRails
[22:59:35] andrewvos: has joined #RubyOnRails
[23:01:06] Technodrome: 100 man dev team is a really strong dev team for a rails app that's for sure
[23:01:16] Technodrome: largest dev team i've ever worked on was around 15 people
[23:01:25] garylabronz: we are hoping to reach close to that number this year
[23:01:35] B1n4r10: has joined #RubyOnRails
[23:02:02] garylabronz: tho, we are moving towards services
[23:02:51] bronson: with that much manpower microservices make a lot of sense.
[23:03:13] one_zero: has joined #RubyOnRails
[23:03:21] bronson: I hate to see 3-person teams splitting a sensible app into 7 pea-sized services. Seemed to be the trend of 2013.
[23:03:34] garylabronz: yeah seen that
[23:03:49] garylabronz: deployment process is always flaky
[23:04:06] garylabronz: as is service discovery
[23:04:09] bronson: and debugging
[23:04:11] garylabronz: and inter app communication
[23:04:22] thorgi: has joined #RubyOnRails
[23:04:37] garylabronz: that being said, i saw a PR out that was type casting strings to ints
[23:04:48] garylabronz: from data pulled from redis
[23:04:56] garylabronz: which was supplied by another internal app
[23:06:49] shanemcd: has joined #RubyOnRails
[23:06:53] bronson: good luck fixing it! gotta sequence multiple deploys with lots of testing.
[23:06:56] bronson: probably not worth it.
[23:07:45] garylabronz: its pretty ridiculous as the team put together a bunch of work with avro, so no idea why they have chosen to do some hack serialization
[23:07:55] ppinkerton: has joined #RubyOnRails
[23:07:58] garylabronz: eh not my problem anyway :)
[23:08:52] baweaver: has joined #RubyOnRails
[23:09:21] srruby: has joined #RubyOnRails
[23:09:32] thorgi: has joined #RubyOnRails
[23:10:45] Deck`: has joined #RubyOnRails
[23:15:11] benlieb_: has joined #RubyOnRails
[23:15:26] mary5030: has joined #RubyOnRails
[23:16:24] mary5030: has joined #RubyOnRails
[23:17:26] jocuman: has joined #RubyOnRails
[23:18:53] openstruct: has joined #RubyOnRails
[23:19:53] flashpoint9: has joined #RubyOnRails
[23:20:00] Technodrome: garylabronz what do you work?
[23:20:25] garylabronz: i deal with our infrastructure
[23:20:37] kmckelvin: has joined #RubyOnRails
[23:20:38] Technodrome: I see, is it a product company?
[23:20:38] garylabronz: my title would be 'devops'
[23:20:54] garylabronz: yeah we have physical good
[23:21:14] Technodrome: like some sort of commerce type of thing?
[23:21:40] Technodrome: i work for a 40 man drupal team , don't laugh
[23:21:45] Technodrome: and doing my rails stuff on the side :P
[23:21:58] garylabronz: i normally work with python
[23:22:11] garylabronz: all our main properties are RoR
[23:22:11] Technodrome: i know python alot more than ruby
[23:22:21] garylabronz: i know enough ruby to make chef do what I need
[23:22:28] Technodrome: i worked as a FT django dev's for a few years
[23:22:53] garylabronz: i write a fair amount of bash, which i love
[23:22:55] Technodrome: i am still up in the air about which i like more, RoR or django
[23:23:03] Technodrome: but i haven't compelted my rails app yet
[23:23:14] garylabronz: im big on flask personally
[23:23:33] Technodrome: micro frameworks are cool, but i think knowing a big stack really well, helps out alot
[23:24:44] bronson: choosing between RoR and Django is like choosing between Ford and Chevy...
[23:25:03] bronson: there are small philisophical differences that people can argue about forever
[23:25:14] garylabronz: well i would prefer to use python, as it comes default on most linux distro's
[23:25:18] garylabronz: and im real sick of compiling ruby
[23:25:18] timdotrb: has joined #RubyOnRails
[23:25:18] bronson: but ultimately they both get the job done
[23:25:24] Technodrome: people keep saying that
[23:25:25] bronson: garylabronz: python 2 or python 3?
[23:25:29] Technodrome: small differences
[23:25:36] Technodrome: to me there is some very large and quite huge differences :P
[23:25:37] bronson: only one comes on Linux distros
[23:25:42] garylabronz: also rbenv/<insert a ridiculous shim> .. i'd take virtualenv every day
[23:25:45] bronson: and it's not the one that everyone is supposed to use.
[23:26:04] garylabronz: unless im supporting centos 5, im fine
[23:26:14] diegoviola: garylabronz: chruby/ruby-install ftw ;)
[23:26:33] bronson: definitely
[23:26:58] garylabronz: chruby expects to loaded by a profile
[23:27:00] diegoviola: garylabronz: on archlinux you don't even have to compile ruby, it ships the latest one most of the time
[23:27:06] garylabronz: lol archlinux
[23:27:12] garylabronz: you think i would run production on arch?
[23:27:14] diegoviola: garylabronz: I think there are some modern packages for ubuntu and debian as well
[23:27:19] Technodrome: django has apps through and through, and the models are different, also routing, really everything is quite different , i dont get why everyone says its just small changes
[23:27:20] garylabronz: yeah brightbox ftw
[23:27:33] diegoviola: garylabronz: you can get modern packages for every distro really
[23:27:53] garylabronz: again i'm not in the business to pull in random repo's on production systems
[23:28:05] garylabronz: sure i could add <random_person
[23:28:12] garylabronz: random_person's apt repo for ruby
[23:28:32] garylabronz: but what if they yank the version i need?
[23:28:38] jmignault: has joined #RubyOnRails
[23:28:44] bronson: Technodrome: when compared to most other frameworks (esp those for scala, Java, etc), they are very similar.
[23:28:50] garylabronz: i can't have deploys be dependant on someone else's infra
[23:29:02] bronson: and trying to solve the same problem: database-backed page-oriented website.
[23:29:11] diegoviola: garylabronz: compiling yourself in that case is better then I suppose
[23:29:11] Technodrome: bronson i would say play framework is more like rails than django :)
[23:29:17] bronson: though action cable is pushing that.
[23:29:33] garylabronz: i compile and host it internally, its all sweet. i just cried when i first came into the ruby community
[23:29:49] garylabronz: everyone seems to be work against OSX as well
[23:30:01] bronson: Technodrome: interesting, I haven't used play. Maybe I need to amend my statement to "all but one"...
[23:31:28] ElFerna: has joined #RubyOnRails
[23:32:03] dexter: has joined #RubyOnRails
[23:32:12] sleungcy: has joined #RubyOnRails
[23:33:23] manfrin_: has joined #RubyOnRails
[23:33:50] Haydos: has joined #RubyOnRails
[23:35:25] christophe971: has left #RubyOnRails: ()
[23:36:48] chipotle: has joined #RubyOnRails
[23:39:21] JoshGlzBrk: has joined #RubyOnRails
[23:40:06] pawnbox: has joined #RubyOnRails
[23:41:00] trinaldi: has joined #RubyOnRails
[23:42:43] xrlabs: has joined #RubyOnRails
[23:43:59] peterklipfel: has joined #RubyOnRails
[23:44:00] sleungcy: has joined #RubyOnRails
[23:45:45] hahuang65: has joined #RubyOnRails
[23:46:19] peterklipfel: has left #RubyOnRails: ()
[23:47:05] jeanlinux: has joined #RubyOnRails
[23:47:35] dopamean_: has joined #RubyOnRails
[23:51:59] ppinkerton: has joined #RubyOnRails
[23:52:06] nettoweb: has joined #RubyOnRails
[23:53:42] blackmesa: has joined #RubyOnRails
[23:54:36] hcnewsom: has joined #RubyOnRails
[23:54:37] lemur: has joined #RubyOnRails
[23:55:45] stannard: has joined #RubyOnRails
[23:56:38] garylabronz: has left #RubyOnRails: ("WeeChat 1.3")
[23:59:11] railsForDaiz: has joined #RubyOnRails
[23:59:17] maximumgeek: has joined #RubyOnRails
[23:59:34] ur5us: has joined #RubyOnRails