« Back to channel list

#RubyOnRails - 29 February 2016

« Back 1 day Forward 1 day »
[00:02:37] delgiudices: has joined #RubyOnRails
[00:02:53] Devalo: has joined #RubyOnRails
[00:04:33] flashpoint9: has joined #RubyOnRails
[00:07:45] delgiudices: Why are the model fields nullable by default on rails? What’s the reason for that convention
[00:08:20] renegadeandy_: has joined #RubyOnRails
[00:11:37] shanemcd_: has joined #RubyOnRails
[00:13:01] Ropeney: has joined #RubyOnRails
[00:13:02] banister: has joined #RubyOnRails
[00:13:30] rubyonrails886: has joined #RubyOnRails
[00:18:10] HalcyonicStorm: has joined #RubyOnRails
[00:23:33] delgiudices: has joined #RubyOnRails
[00:25:32] pawnbox: has joined #RubyOnRails
[00:26:07] _Tariq: has joined #RubyOnRails
[00:28:03] augcesar[2]: has joined #RubyOnRails
[00:28:25] Radar: delgiudices: What do you think they should be instead?
[00:28:53] delgiudices: Radar: They should not allow null in my opinion
[00:28:54] Radar: delgiudices: We have two fields in our database which are called price and sale_price. We want price to NEVER be nullable, but we want sale_price to be nullable because a null sale price indicates that the item is not on sale
[00:29:02] delgiudices: Radar: But honestly thats just my opinion
[00:29:26] delgiudices: Radar: well yes that’s a special case but most of the times you want fields to never be nullable
[00:29:37] Radar: delgiudices: why?
[00:29:55] delgiudices: Radar: most of the time i add fields in a model, it makes sense we never want it null
[00:30:04] Radar: delgiudices: Attempting to save a record in Rails where the DB doesn't allow nulls on the fields leads to a hard-to-figure-out message.
[00:30:21] Radar: maybe it works in your case, but Rails has chosen not to do that
[00:31:02] delgiudices: Radar: i see, so a tipical workflow when creating models is, running rails generate model name then updating the migration to add the null fields and then adding the validates on the models?
[00:31:13] Radar: delgiudices: Yes, if that is what you want
[00:31:25] delgiudices: Radar: sounds good, just trying to figure out how to work the rails way
[00:32:59] ElFerna_: has joined #RubyOnRails
[00:33:07] intrigueD: has joined #RubyOnRails
[00:38:25] HalcyonicStorm: has joined #RubyOnRails
[00:39:31] trosborn: if Rails didn’t by default make fields null, would it cause problems with migrations? say you went to add another field to a production database, if Rails didn’t allow null wouldn’t it have to go back and and fill in the null fields with some sort of value?
[00:39:41] delgiudices: has left #RubyOnRails: ()
[00:39:46] delgiudices: has joined #RubyOnRails
[00:40:55] statelesscode: It makes sense to always have your model validations and database schema in-sync with each other. I would put both presence: true in your model validation and null: false in your database migration if you don’t want something nullable.
[00:41:47] statelesscode: That way it will fail validation without trying to hit your database if you are trying to create or save a record that has a required field nil.
[00:42:41] G: has joined #RubyOnRails
[00:44:08] dubalubdub: has joined #RubyOnRails
[00:44:20] trosborn: statelesscode: I was asking my question in regards to the earlier discussion about why Rails by default makes fields nullable. I was just speculating about one possible problem if Rails by default did not allow nullable.
[00:44:24] statelesscode: And it will identify validation failures with the error message “Can’t be blank”
[00:47:32] fedexo: has joined #RubyOnRails
[00:48:22] _Tariq: has joined #RubyOnRails
[00:52:21] ebbflowgo: has joined #RubyOnRails
[00:53:13] dalbusch1t: has joined #RubyOnRails
[00:53:34] statelesscode: Ah, makes sense.
[00:53:43] mephistophocles: has joined #RubyOnRails
[00:55:14] meinside: has joined #RubyOnRails
[00:55:26] sevenseacat: has joined #RubyOnRails
[00:55:27] pawnbox: has joined #RubyOnRails
[00:55:58] fourq: has joined #RubyOnRails
[00:56:23] statelesscode: I was actually responding to delgiudices from about 20 minutes ago rather than your question. Sorry for the misunderstanding.
[00:59:16] trosborn: oh hah okay no worries :)
[00:59:43] shanemcd_: has joined #RubyOnRails
[01:00:19] snowy: has joined #RubyOnRails
[01:02:26] one_zero: has joined #RubyOnRails
[01:03:47] queequeg1: has joined #RubyOnRails
[01:03:47] mawiegand: has joined #RubyOnRails
[01:04:20] delgiudices: has left #RubyOnRails: ()
[01:04:30] delgiudices: has joined #RubyOnRails
[01:06:22] bklane: has joined #RubyOnRails
[01:07:25] shanemcd_: has joined #RubyOnRails
[01:16:02] allcentury: has joined #RubyOnRails
[01:16:07] _Tariq: has joined #RubyOnRails
[01:17:14] flip_digits: has joined #RubyOnRails
[01:17:30] Megamos: has joined #RubyOnRails
[01:21:11] flip_digits: Question: I was reading this post on treehouse.com http://blog.teamtreehouse.com/its-time-to-httparty and I saw the httparty has a "success?" method. However when I grep for the method it's not listed in Httparty's api. How do I found out where it's implemented?
[01:21:19] HalcyonicStorm: has joined #RubyOnRails
[01:21:32] ElFerna_: has joined #RubyOnRails
[01:21:52] htmldrum: has joined #RubyOnRails
[01:21:52] Graphettion: has joined #RubyOnRails
[01:22:53] matthewd: flip_digits: http://tenderlovemaking.com/2016/02/05/i-am-a-puts-debuggerer.html#im-calling-a-method-but-i-dont-know-where-it-goes
[01:23:50] Ropeney: thats handy
[01:24:38] sevenseacat: there's a lot of good tips in that post
[01:24:45] flip_digits: matthewd: I read that post. Thanks
[01:25:11] flip_digits: I meant If I had not read the treehouse blog post I wouldn't have known the method existed
[01:25:35] HalcyonicStorm: has left #RubyOnRails: ()
[01:25:39] siaW: has joined #RubyOnRails
[01:25:43] sevenseacat: flip_digits: that blog post is also nearly five years old
[01:26:03] sevenseacat: so the method might not exist in the API anymore
[01:26:59] sevenseacat: always check dates on things :)
[01:27:31] shanemcd_: has joined #RubyOnRails
[01:27:51] flip_digits: the method does exist. I just started using it. my question was more along the lines of "how do I find all of the methods in an api I'm using"
[01:28:11] matthewd: > How do I found out where it's implemented?
[01:28:12] sevenseacat: by reading the API docs
[01:28:17] sevenseacat: thats what they're for
[01:28:18] ElFerna_: has joined #RubyOnRails
[01:28:38] flip_digits: I don't see it listed though that's the thing
[01:29:40] sevenseacat: then it may be intended for internal use only
[01:29:47] Ropeney: flip_digits, look at https://github.com/jnunemaker/httparty/blob/6f4d6ea4a2707a4f1466f45bf5c67556cdbed2b7/History search success? and then look up that committ and it might tell you how its implemented and where its delegated too :)
[01:29:47] sevenseacat: and you shouldn't use it
[01:29:49] siaW: has joined #RubyOnRails
[01:30:47] matthewd: At a glance, it seems the docs are not particularly crafted
[01:31:06] matthewd: So I think it's undocumented just because of how it's implemented
[01:31:35] _Tariq: has joined #RubyOnRails
[01:32:12] dkam: has joined #RubyOnRails
[01:32:13] flip_digits: thank! Ropeney
[01:32:17] DoctorMonocular: has joined #RubyOnRails
[01:32:24] matthewd: (in which case, there really isn't any useful trick to knowing about the available methods)
[01:33:04] sevenseacat: other than reading the code itself
[01:33:15] sevenseacat: which is always fun to do
[01:34:05] flip_digits: sevenseacat: yep, you are correct!
[01:34:16] sevenseacat: (I like when that happens)
[01:34:30] uglybandersnatch: has joined #RubyOnRails
[01:35:05] bklane: has joined #RubyOnRails
[01:35:09] matthewd: When you make a gem, you must make a gem hard
[01:35:51] sevenseacat: I see what you did there
[01:36:20] shanemcd_: has joined #RubyOnRails
[01:37:38] diegoviola: has joined #RubyOnRails
[01:37:56] Spami: has joined #RubyOnRails
[01:40:42] bronson: has joined #RubyOnRails
[01:42:25] blackmes1: has joined #RubyOnRails
[01:43:00] bklane_: has joined #RubyOnRails
[01:44:52] flip_digits: Ropeney: Hey, how did you find that link in the codebase? Teach me please
[01:45:17] sami: has joined #RubyOnRails
[01:46:11] uglybandersnatch: has joined #RubyOnRails
[01:46:52] Flex: has joined #RubyOnRails
[01:48:20] adre: has joined #RubyOnRails
[01:49:10] rubyonrailed: has joined #RubyOnRails
[01:49:37] Ropeney: flip_digits: i used search repository up the top for "success?"
[01:50:25] flip_digits: I did the same search but my results are not the same
[01:50:35] Ropeney: then it wasn't the same :(
[01:50:50] flip_digits: I don't know what the "blob" is in your search
[01:51:17] alexhartley: has joined #RubyOnRails
[01:51:22] Ropeney: flip_digits, https://github.com/jnunemaker/httparty/search?utf8=%E2%9C%93&q=success%3F just searching "success?"
[01:52:47] arBmind: has joined #RubyOnRails
[01:53:05] flip_digits: Ropeney: thank you
[01:54:31] _Tariq: has joined #RubyOnRails
[01:54:45] echojaybird: has joined #RubyOnRails
[01:55:31] marcdel: has joined #RubyOnRails
[01:55:43] baweaver: has joined #RubyOnRails
[02:00:03] greengriminal: has joined #RubyOnRails
[02:03:25] blackmes1: has joined #RubyOnRails
[02:03:41] ElFerna_: has joined #RubyOnRails
[02:04:17] shanemcd_: has joined #RubyOnRails
[02:04:27] Devalo: has joined #RubyOnRails
[02:05:20] pawnbox: has joined #RubyOnRails
[02:07:36] benlieb: has joined #RubyOnRails
[02:08:08] siaW: has joined #RubyOnRails
[02:08:39] _Tariq: has joined #RubyOnRails
[02:09:22] bklane: has joined #RubyOnRails
[02:10:05] trosborn: has joined #RubyOnRails
[02:12:13] unreal_: has joined #RubyOnRails
[02:15:43] _Tariq: has joined #RubyOnRails
[02:15:57] enitiz: has joined #RubyOnRails
[02:16:26] SteenJobs: has joined #RubyOnRails
[02:16:35] chendry: has joined #RubyOnRails
[02:22:06] Jasaka: has joined #RubyOnRails
[02:22:31] anirban: has joined #RubyOnRails
[02:25:08] kpwarr: Is it impossible to instantiate an object from a model that belongs to another model without supplying an id from that other model?
[02:28:00] chagel: has joined #RubyOnRails
[02:28:13] delgiudices: has joined #RubyOnRails
[02:28:27] korzybski: Oh, AR! Why don’t you let me cast-sql-types to Ruby-types at the query-level?!
[02:28:35] korzybski: You would be so much better!
[02:30:41] matthewd: korzybski: If you're running straight SQL queries and want to control the casting on those results, it sounds like you don't want an ORM
[02:31:09] korzybski: LOL I don’t! But I do want translation between Postgres-types and Ruby-classes.
[02:31:40] korzybski: Looks like Virtus may be what I want...
[02:33:13] matthewd: Sounds more like you want the pg gem to me
[02:33:28] korzybski: pg_gem is close… but doesn’t do JSONB
[02:34:19] korzybski: ActiveRecord has all the translations inside its adapter… but it’s tied-down to the class:table paradigm.
[02:34:19] beingjohnm: has joined #RubyOnRails
[02:34:28] korzybski: I want to cast at the query-level.
[02:35:25] pawnbox: has joined #RubyOnRails
[02:35:57] chipotle: has joined #RubyOnRails
[02:36:56] Megamos: has joined #RubyOnRails
[02:43:15] bklane_: has joined #RubyOnRails
[02:44:22] dkam_: has joined #RubyOnRails
[02:44:55] Mia: has joined #RubyOnRails
[02:45:21] chendry: has joined #RubyOnRails
[02:46:38] nogic: has joined #RubyOnRails
[02:47:05] hackeron: has joined #RubyOnRails
[02:47:26] Chagel_: has joined #RubyOnRails
[02:47:37] Ratler: has joined #RubyOnRails
[02:47:38] Scient: has joined #RubyOnRails
[02:48:03] knight_: has joined #RubyOnRails
[02:48:35] gaf_: has joined #RubyOnRails
[02:48:49] delgiudices: has joined #RubyOnRails
[02:49:10] adavia: has joined #RubyOnRails
[02:49:34] kies: has joined #RubyOnRails
[02:49:54] marcdel: has joined #RubyOnRails
[02:49:55] rubyonrailed: has joined #RubyOnRails
[02:50:34] Brando753: has joined #RubyOnRails
[02:52:30] diego2: has joined #RubyOnRails
[02:55:53] chagel: has joined #RubyOnRails
[02:58:36] uglybandersnatch: has joined #RubyOnRails
[02:58:40] dkam_: has joined #RubyOnRails
[02:58:57] delgiudices: has joined #RubyOnRails
[02:59:47] kpwarr: [Rails 5] why is it that `rails s` also listens on tcp://localhost:3000 as well as http?
[03:00:07] pawnbox: has joined #RubyOnRails
[03:00:52] chagel: has joined #RubyOnRails
[03:01:03] snowy: has joined #RubyOnRails
[03:02:26] Radar: kpwarr: http://localhost:3000 in your browser opens a TCP connection to localhost:3000.
[03:05:51] Devalo: has joined #RubyOnRails
[03:05:51] chagel: has joined #RubyOnRails
[03:05:57] groatyoats: has joined #RubyOnRails
[03:06:43] shanemcd_: has joined #RubyOnRails
[03:08:10] bklane: has joined #RubyOnRails
[03:10:51] chagel: has joined #RubyOnRails
[03:14:45] _Tariq: has joined #RubyOnRails
[03:15:15] bklane_: has joined #RubyOnRails
[03:15:51] chagel: has joined #RubyOnRails
[03:17:21] blackmes1: has joined #RubyOnRails
[03:21:04] chagel: has joined #RubyOnRails
[03:24:47] chouhoulis: has joined #RubyOnRails
[03:25:40] pawnbox: has joined #RubyOnRails
[03:25:46] emachnic: has joined #RubyOnRails
[03:26:04] chagel: has joined #RubyOnRails
[03:26:19] robbyoconnor: has joined #RubyOnRails
[03:29:02] kp666: has joined #RubyOnRails
[03:30:07] korzybski: When a set of checkboxes, e.g. model[attr][], and none are checked… form-submission sends nothing to server… how are people solving that?
[03:30:29] sevenseacat: depends how you make your form - something should be sent to server
[03:31:03] chagel: has joined #RubyOnRails
[03:32:24] korzybski: Can I make every field in my form required via strong_params? params.require
[03:32:40] sevenseacat: that's not what its for
[03:33:03] sevenseacat: strong params require says 'if this field isnt present, this is a malformed request'
[03:33:19] sevenseacat: its not for validation
[03:33:22] soule: has joined #RubyOnRails
[03:34:50] tbuehlmann: has joined #RubyOnRails
[03:35:11] algernop_k: has joined #RubyOnRails
[03:36:03] chagel: has joined #RubyOnRails
[03:37:12] korzybski: sevenseacat: Ah, I see. If I include a hidden-field with the same name, but ‘’ value, I always get the post-parameter… and I was before_validation, rejecting elements that were blank?
[03:41:03] krzkrzkrz: has joined #RubyOnRails
[03:41:03] chagel: has joined #RubyOnRails
[03:43:02] DmitryBochkarev: has joined #RubyOnRails
[03:43:23] bronson: has joined #RubyOnRails
[03:43:42] marcdel: has joined #RubyOnRails
[03:46:04] chagel: has joined #RubyOnRails
[03:46:28] DoctorMonocular: has joined #RubyOnRails
[03:49:03] adre: has joined #RubyOnRails
[03:50:43] rubyonrailed: has joined #RubyOnRails
[03:51:13] chagel: has joined #RubyOnRails
[03:52:55] blackmes1: has joined #RubyOnRails
[03:53:10] flashpoint9: has joined #RubyOnRails
[03:56:05] chagel: has joined #RubyOnRails
[03:57:01] DmitryBochkarev: has joined #RubyOnRails
[04:01:05] chagel: has joined #RubyOnRails
[04:01:25] hello9: will form_for work when rendering the object multiple times in the same form? I have three different versions of the same model as partials in the same form, will form_for work here? https://gist.github.com/anonymous/df2face392091b92f511
[04:03:48] SteenJobs: has joined #RubyOnRails
[04:04:13] Radar: hello9: You will need to pass the f local var to each of those partials
[04:04:14] Radar: https://gist.github.com/anonymous/df2face392091b92f511#file-index-html-erb-L4-L6
[04:04:40] Radar: hello9: also: render "details", { type: "Initial", f: f } is a lot short.
[04:05:45] hello9: @Radar thanks
[04:08:04] kpwarr: I'm doing testing with rails fixtures. the method of doing data associations by using the names of other fixtures is not working for me. Note that first_player_id is `nil`: https://gist.github.com/KeriWarr/b93da5e9e00f46976feb
[04:09:26] moei: has joined #RubyOnRails
[04:11:22] hello9: @Radar how do I identify each partial in the params, before i switched to form_for I was namespacing them
[04:11:23] chagel: has joined #RubyOnRails
[04:12:32] Radar: hello9: I don't understand your requestr.
[04:13:02] braincrash: has joined #RubyOnRails
[04:14:22] hello9: In the partial from that gist there is a text_field for "name", how can I get it so I can tell which "name" is in the params based on the "type" that gets passed when rendering the partial
[04:15:01] emachnic: has joined #RubyOnRails
[04:16:23] chagel: has joined #RubyOnRails
[04:20:56] _Tariq: has joined #RubyOnRails
[04:21:23] chagel: has joined #RubyOnRails
[04:21:26] SteenJobs: has joined #RubyOnRails
[04:22:18] Eswar: has joined #RubyOnRails
[04:22:25] Megamos: has joined #RubyOnRails
[04:25:49] krzkrzkrz: has joined #RubyOnRails
[04:25:54] chouhoulis: has joined #RubyOnRails
[04:26:23] chagel: has joined #RubyOnRails
[04:27:16] sash__: has joined #RubyOnRails
[04:27:20] draig: has joined #RubyOnRails
[04:30:03] DoctorMonocular: has joined #RubyOnRails
[04:31:41] chagel: has joined #RubyOnRails
[04:34:08] r0bby_: has joined #RubyOnRails
[04:34:25] trosborn: has joined #RubyOnRails
[04:36:10] AntiSpamMeta_: has joined #RubyOnRails
[04:36:15] _Tariq: has joined #RubyOnRails
[04:36:42] chagel: has joined #RubyOnRails
[04:37:07] smoitra: has joined #RubyOnRails
[04:38:08] marcdel: has joined #RubyOnRails
[04:39:45] eggoez: has joined #RubyOnRails
[04:42:24] nullwarp: has joined #RubyOnRails
[04:42:51] allcentury: has joined #RubyOnRails
[04:44:17] hello9: @Radar, the problem is how to separate the form fields by partial, e.g the params show up like {"utf8"=>"✓", "posts"=>{"name"=>""}} even though i fill out one of the name text fields
[04:44:25] nogic: has joined #RubyOnRails
[04:44:26] Radar: hello9: !shrug
[04:44:26] helpa: hello9: ¯\_(ツ)_/¯ Sorry, Radar is not able to help you any further as they do not know.
[04:44:45] SteenJobs: has joined #RubyOnRails
[04:44:50] hello9: thanks anyway ;-D
[04:45:52] kirillzh: has joined #RubyOnRails
[04:47:40] yaewa: has joined #RubyOnRails
[04:48:55] moei: has joined #RubyOnRails
[04:51:26] rubyonrailed: has joined #RubyOnRails
[04:54:08] chagel: has joined #RubyOnRails
[04:54:29] cookiez: has joined #RubyOnRails
[04:54:55] emachnic: has joined #RubyOnRails
[04:55:24] hello9: has joined #RubyOnRails
[04:55:26] marcdel: has joined #RubyOnRails
[04:56:35] flexo: has joined #RubyOnRails
[04:59:09] chagel: has joined #RubyOnRails
[04:59:33] snowy: has joined #RubyOnRails
[04:59:36] bungoman: has joined #RubyOnRails
[05:01:05] siaW: has joined #RubyOnRails
[05:04:22] chagel: has joined #RubyOnRails
[05:04:59] drale2k: how would you have the actioncable js file (where connected, disconnected etc happens) have talk to your app's js
[05:05:16] drale2k: f.e. when you have a chat and someone connects, you wan to show his username in the sidebar
[05:05:43] apotry: has joined #RubyOnRails
[05:08:04] techsethi: has joined #RubyOnRails
[05:08:50] duncannz: has joined #RubyOnRails
[05:08:54] kies^: has joined #RubyOnRails
[05:10:38] chagel: has joined #RubyOnRails
[05:11:03] Eswar: has joined #RubyOnRails
[05:11:55] vedu: drale2k: seems like you have to use websockets. rails 5 has built-in support for it
[05:12:00] euphoriaa: has joined #RubyOnRails
[05:12:21] drale2k: i am using websockets
[05:12:26] sp1rs: has joined #RubyOnRails
[05:12:35] drale2k: but i need by actioncable js code to talk to my app's js code
[05:14:01] vedu: drale2k: oh right. not sure how you would do that :)
[05:14:37] arup_r: has joined #RubyOnRails
[05:14:48] pawnbox: has joined #RubyOnRails
[05:15:42] vedu: Is it okay to populate a table in a rails migration? I don't want to use seed data as I want the data to be added on my existing production server
[05:15:48] chagel: has joined #RubyOnRails
[05:20:10] zoidfarb: has joined #RubyOnRails
[05:20:37] chagel: has joined #RubyOnRails
[05:21:03] zoidfarb: Hello. I see methods on some models like Page.find_page_by_name but I don't see them defined anywhere. Are those implicitly created by ActiveRecord somehow?
[05:22:37] sevenseacat: that one doesnt sound like it would be
[05:22:47] SteenJobs: has joined #RubyOnRails
[05:22:54] sevenseacat: but Page.find_by_name would be (in a Rails 3 app) if your Page model had a name attribute
[05:23:23] sevenseacat: http://guides.rubyonrails.org/active_record_querying.html#dynamic-finders
[05:23:41] arup_r: "Are those implicitly created by ActiveRecord somehow?" ... yes.. you are right
[05:23:53] zoidfarb: hmm. I have City.find_city_by_name and Page.find_page_by_name
[05:24:06] sevenseacat: those aren't, no.
[05:24:11] zoidfarb: so those don't match that pattern
[05:24:22] zoidfarb: but I can't seem to find them grepping
[05:24:33] vedu: zoidfarb: yeah not those. find_by_<attribute> methods are created
[05:24:34] sevenseacat: they may be provided by some other gem.
[05:24:45] zoidfarb: Is there a way from the rails console (or IRB?) to ask "Where is this defined?"
[05:25:43] Eswar: has joined #RubyOnRails
[05:25:52] sevenseacat: method(:your_method).source_location
[05:27:53] chagel: has joined #RubyOnRails
[05:27:59] chouhoulis: has joined #RubyOnRails
[05:30:19] techsethi: has joined #RubyOnRails
[05:32:52] chagel: has joined #RubyOnRails
[05:33:47] arup_r: has joined #RubyOnRails
[05:34:20] zoidfarb: @sevenseacat: That worked, thank you.
[05:35:51] njero: has joined #RubyOnRails
[05:37:52] chagel: has joined #RubyOnRails
[05:38:20] abolishme: has joined #RubyOnRails
[05:38:36] Radar: zoidfarb: was it defined in your model?
[05:39:53] vedu: How to decide between using seed data and using migrations to add data to the database?
[05:41:24] bronson: has joined #RubyOnRails
[05:42:04] blackmes1: has joined #RubyOnRails
[05:42:52] chagel: has joined #RubyOnRails
[05:46:46] robbyoconnor: has joined #RubyOnRails
[05:48:27] Radar: vedu: I would use seeds.
[05:49:19] joshkovach: has joined #RubyOnRails
[05:49:25] drale2k: where do files (.zip) go in a Rails app which are meant be downloaded ?
[05:49:31] drale2k: can i put them in public/downloads ?
[05:49:52] Radar: drale2k: Should they be accessible to all users who know the URL or should they require some sort of authentication?
[05:50:03] drale2k: Radar: all users
[05:50:08] Radar: drale2k: public is fine
[05:50:22] drale2k: ok thanks and how would i make it accessible without getting into a fight with routes?
[05:50:51] sevenseacat: link to the path of the file within public/
[05:51:12] drale2k: ah so rails knows about the /public path
[05:51:24] arup_r: Radar: if it is not for all users, what is the ideal place to keep? asking for self knowledge
[05:51:41] drale2k: sevenseacat: i need to share the link
[05:52:00] sevenseacat: the public folder is just that, publicly accessible
[05:52:01] Radar: arup_r: in a directory which is not "public" and then you serve it through a controller
[05:52:07] sevenseacat: everything within it is publicly accessible
[05:52:09] rubyonrailed: has joined #RubyOnRails
[05:52:17] drale2k: so what would it look like in /public/download at domain.com ? Just domain.com/public/downloads ?
[05:52:32] arup_r: ok. got it. thanks Radar
[05:52:39] sevenseacat: well given your web server has its app root as public/
[05:52:48] sevenseacat: public isnt part of the URL
[05:53:00] alexhartley: has joined #RubyOnRails
[05:53:16] vedu: Radar: yeah so would most people- as I can see on blogs and forums. But I cannot understand why. I am creating a Locations table and I want it to be populated with a few cities. By using seeds I will have to remember to run the seed command everytime I set up a new server
[05:53:52] sevenseacat: vedu: its part of a db:setup command so that makes sense
[05:54:09] drale2k: sevenseacat: thanks works
[05:54:32] sevenseacat: drale2k: i hope you're not testing this in production
[05:54:48] drale2k: sevenseacat: tested on local but i guess it is gonna work the same way on prod, why?
[05:54:55] drale2k: at the end this should work on prod
[05:55:12] sevenseacat: i dont understand people
[05:55:29] sevenseacat: instead of trying things yourself or googling, you have to ask, then verify
[05:55:48] drale2k: i alwaays google, so i don't understand why you don't udnerstand people
[05:56:00] drale2k: i didn't know you can access /public via a direct link
[05:56:02] sevenseacat: yeah you wouldn't
[05:56:09] vedu: sevenseacat, Radar: right :) so I just have to remember to run it *once* on my existing server
[05:56:57] PrideCoding: How would I go about adding a image to a title post, when a image has been uploaded part of the post
[05:57:07] drale2k: that's why you are in tech and not in HR or something ;)
[05:57:12] drale2k: thanks anyway
[05:57:14] sevenseacat: Pridecoding: what?
[05:57:31] sevenseacat: whats a title post?
[05:58:46] drale2k: Pridecoding: you are creating a blog post and want to upload an image to that post ?
[05:58:51] PrideCoding: I have a simple blog app, it has a title and a body, I added a image upload feature. I'd like a icon next to the title, so the viewer knows the post has a image
[05:59:37] PrideCoding: Sorry, I'm a newbie
[05:59:48] sevenseacat: I'll let drale2k take this one
[06:00:28] drale2k: Pridecoding: does the image uploading already work?
[06:00:59] drale2k: ok then check if the post has an image, and if it does show the icon in the view
[06:01:24] trosborn: has joined #RubyOnRails
[06:01:34] drale2k: did you use some gem for image uploads?
[06:02:50] Pazician: has joined #RubyOnRails
[06:03:12] drale2k: smth like if post.image.present? .. <span class="icon">img_link_to_icon</span>
[06:03:20] PrideCoding: Yes, I'm using paperclip, it would great, just trying to wrap my head around the syntax to make a icon show up in the view, right now I have the icon showing even if the post has no image.
[06:03:45] drale2k: are you checking if the post has an image?
[06:04:05] PrideCoding: Works* I mean
[06:04:17] ziyadb: has joined #RubyOnRails
[06:04:56] drale2k: how are you checking if the post has an image
[06:05:08] PrideCoding: It does, because I'm uploading it myself and it does show next to the title on the show page
[06:06:00] drale2k: you said "now I have the icon showing even if the post has no image" and then you say "it doesn't show next to the title on the show page"
[06:06:06] drale2k: does it show right now or not
[06:06:51] dionysus69: has joined #RubyOnRails
[06:07:52] PrideCoding: Sorry, it shows even if a image hasn't been uploaded.
[06:08:13] drale2k: how are you checking if the image exists in the view ?
[06:09:07] sp1rs: has joined #RubyOnRails
[06:10:05] PrideCoding: <h2 class="ti-gallery"><%= link_to post.title,
[06:10:42] PrideCoding: I guess that's what I need to do, check if the image exist
[06:10:43] drale2k: gist your view
[06:10:48] drale2k: gist.github.com
[06:11:56] Pridecod_: has joined #RubyOnRails
[06:13:24] robbyoconnor: has joined #RubyOnRails
[06:17:07] rubyonrailed: has joined #RubyOnRails
[06:19:37] pinkerton: has joined #RubyOnRails
[06:20:13] Pridecod_: https://gist.github.com/anonymous/dd3129ba7347c6b8de87
[06:20:18] ur5us: has joined #RubyOnRails
[06:21:01] PrideCoding: That's it drale2k
[06:21:17] Radar: Pridecoding: !gist-usage
[06:21:17] helpa: Pridecoding: How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.markdown
[06:22:52] drale2k: Pridecod_: you have to add a check on line 27. i added a comment
[06:23:17] drale2k: people say to check with .exists? rather than .present? with paperclip so i used that
[06:23:45] chagel: has joined #RubyOnRails
[06:24:21] drale2k: or rather put that check wherever you want to check if the image exists, not sure if that is the place you want it in
[06:24:32] PrideCoding: Ok, thanks drale2k
[06:25:14] Ropeney: drale2k: I think .exists? checks if its in the current storage aswell, .present? is checks if its in db. Atleast i believe this is the case for carrierwave.
[06:28:06] pyemkey: has joined #RubyOnRails
[06:28:34] robbyoconnor: has joined #RubyOnRails
[06:28:42] drale2k: Ropeney: sounds right
[06:28:42] chouhoulis: has joined #RubyOnRails
[06:28:45] chagel: has joined #RubyOnRails
[06:28:55] shanemcd_: has joined #RubyOnRails
[06:29:25] Devalo: has joined #RubyOnRails
[06:33:44] chagel: has joined #RubyOnRails
[06:38:30] pinkerton: has joined #RubyOnRails
[06:38:45] chagel: has joined #RubyOnRails
[06:38:48] sash__: has joined #RubyOnRails
[06:43:43] chagel: has joined #RubyOnRails
[06:48:44] chagel: has joined #RubyOnRails
[06:49:38] kpwarr: hey, I'm having an issue where the model instances generated by my test fixtures (which have references to each other) use inconsistent id's: https://gist.github.com/KeriWarr/941afe6bbca159f2ba2d I'm totally stumped :/
[06:50:48] null__: has joined #RubyOnRails
[06:50:48] null__: has joined #RubyOnRails
[06:53:45] chagel: has joined #RubyOnRails
[06:54:06] TheMoonMaster: has joined #RubyOnRails
[06:56:02] solars: has joined #RubyOnRails
[06:56:21] stannard: has joined #RubyOnRails
[06:56:50] Macaveli: has joined #RubyOnRails
[06:57:23] allcentury: has joined #RubyOnRails
[07:01:40] Eswar: has joined #RubyOnRails
[07:04:16] dextertzu: has joined #RubyOnRails
[07:06:10] netzfisch: has joined #RubyOnRails
[07:06:33] arup_r: has joined #RubyOnRails
[07:08:07] chagel: has joined #RubyOnRails
[07:08:12] njero: has joined #RubyOnRails
[07:13:12] chagel: has joined #RubyOnRails
[07:13:26] Guest34101: has joined #RubyOnRails
[07:13:27] blackmes1: has joined #RubyOnRails
[07:13:47] ewnd9_: has joined #RubyOnRails
[07:15:05] SteenJobs: has joined #RubyOnRails
[07:15:44] netzfisch: has joined #RubyOnRails
[07:16:03] yogeshrt: has joined #RubyOnRails
[07:17:26] scepticulous: has joined #RubyOnRails
[07:18:17] uglybandersnatch: has joined #RubyOnRails
[07:18:45] pawnbox: has joined #RubyOnRails
[07:20:32] chagel: has joined #RubyOnRails
[07:20:56] kies^: has joined #RubyOnRails
[07:24:10] sp1rs: has joined #RubyOnRails
[07:24:29] robbyoconnor: has joined #RubyOnRails
[07:25:56] chagel: has joined #RubyOnRails
[07:26:51] sandstrom: has joined #RubyOnRails
[07:28:32] noodle: has joined #RubyOnRails
[07:29:21] sp1rs: has joined #RubyOnRails
[07:29:27] chouhoulis: has joined #RubyOnRails
[07:29:39] xardion_: has joined #RubyOnRails
[07:29:42] srinidhi: has joined #RubyOnRails
[07:31:09] chagel: has joined #RubyOnRails
[07:32:33] r0bby_: has joined #RubyOnRails
[07:33:22] yogeshrt: has joined #RubyOnRails
[07:33:29] comrad: has joined #RubyOnRails
[07:33:38] comrad: has joined #RubyOnRails
[07:36:09] chagel: has joined #RubyOnRails
[07:38:53] allcentury: has joined #RubyOnRails
[07:40:06] lyoshajapan: has joined #RubyOnRails
[07:41:10] chagel: has joined #RubyOnRails
[07:46:01] defsdoor: has joined #RubyOnRails
[07:46:09] chagel: has joined #RubyOnRails
[07:49:00] Polysics: has joined #RubyOnRails
[07:49:13] Polysics: hello! do you think it is time to start using Rails 5 if I am starting a new app, or not yet?
[07:49:51] sp1rs: has joined #RubyOnRails
[07:50:23] arup_r: polysics: no according to me. Wait pls
[07:50:32] adre: has joined #RubyOnRails
[07:50:38] arup_r: I tried and I saw the pain..
[07:50:44] Polysics: I do not even really NEED the 5 features
[07:50:53] Polysics: arup_r: curious as to what exactly happened
[07:50:58] arup_r: yeah, then be with stable rails 4
[07:51:09] chagel: has joined #RubyOnRails
[07:51:16] Polysics: it's not a day job project so I would not have much time for patching/fixing :)
[07:51:17] arup_r: First think, turbolinks5 it broke my code..
[07:51:33] baweaver: stick to stable versions unless you're experimenting
[07:51:37] arup_r: they removed lot of API and brought into some new.. and the doc is in WIP
[07:51:44] baweaver: even then I tend to avoid beta like the plague.
[07:51:51] Polysics: I am still on the fence about Turbolinks in general
[07:52:01] arup_r: and some gems are there, which is still not compatible with rails 5
[07:52:09] Polysics: yeah, I will stub the prototype out in 4 while waiting for at least RC1
[07:52:45] arup_r: yes.. they are not officially relaesing because core team themselves do know it is not production ready yet..
[07:52:55] Polysics: beta means "not everything works" (and rightfully so, I am not saying that beta should be stable or it is not named beta :) )
[07:52:56] arup_r: so if they wait, you should also wait
[07:53:06] pawnbox: has joined #RubyOnRails
[07:53:38] sandstrom: has joined #RubyOnRails
[07:53:54] Polysics: to be honest the whole Rails 5 dev cycle has some shady areas
[07:54:10] Polysics: it was announced, then no one spoke of it for months, then suddenly it goes up as beta
[07:54:52] Polysics: ok, so, another thing: is there an application template worth using?
[07:55:01] kgrz: has joined #RubyOnRails
[07:55:01] Polysics: I keep meaning to build my own, maybe I should
[07:56:40] kgrz: has joined #RubyOnRails
[07:57:15] Jasaka: has joined #RubyOnRails
[07:57:39] wethu: has joined #RubyOnRails
[08:00:33] chagel: has joined #RubyOnRails
[08:03:00] defsdoor: has joined #RubyOnRails
[08:04:46] sp1rs: has joined #RubyOnRails
[08:04:53] Pupeno: has joined #RubyOnRails
[08:05:28] solars: quick question: if I have a helper method in my application controller, how do I test this method in rspec?
[08:05:33] chagel: has joined #RubyOnRails
[08:05:56] Polysics: create a controller in the spec, then test an instance of that
[08:06:20] Polysics: it's generally how I test modules, not sure if it's The Rails WayTM
[08:07:55] vedu: I want to use the method http://api.rubyonrails.org/classes/ActiveRecord/Migration.html#method-i-say_with_time . what should I `require` ? require 'active_record/migration' doesn't work
[08:08:38] moeabdol2: has joined #RubyOnRails
[08:10:24] Polysics: you want to use that method where? in a migration?
[08:11:21] darutoko: has joined #RubyOnRails
[08:11:23] solars: polysics, that's what I'm doing now, just thought there might be a nicer way :)
[08:11:28] pawnbox: has joined #RubyOnRails
[08:12:12] sandstrom: has joined #RubyOnRails
[08:12:29] Polysics: I think that unless you indirectly test the helper in one of your controller specs, it is the nicest way
[08:13:57] chagel: has joined #RubyOnRails
[08:14:17] siksi: has left #RubyOnRails: ()
[08:15:30] jas02: has joined #RubyOnRails
[08:16:25] lightheaded: has joined #RubyOnRails
[08:17:35] Eswar: has joined #RubyOnRails
[08:17:46] shanemcd_: has joined #RubyOnRails
[08:18:39] arup_r: has joined #RubyOnRails
[08:19:12] ur5us: has joined #RubyOnRails
[08:20:24] artto: has joined #RubyOnRails
[08:21:06] pinkerton: has joined #RubyOnRails
[08:21:57] lxsameer: has joined #RubyOnRails
[08:22:13] lyoshajapan: has joined #RubyOnRails
[08:23:28] Devalo: has joined #RubyOnRails
[08:24:51] alexhartley: has joined #RubyOnRails
[08:28:45] mices: do i have to include a link to applcation.js in my view ?
[08:30:11] chouhoulis: has joined #RubyOnRails
[08:30:57] Macaveli: has joined #RubyOnRails
[08:32:23] chagel: has joined #RubyOnRails
[08:32:29] mices: Trying to display the contents of data-description when a full image is displayed in bluimp-image-gallery https://gist.github.com/mices/f9516cb3ea9da3f3c690
[08:33:14] universa1: mices: you need to load the application.js file somewhere, if you're using turbolinks in the head section of your html document.
[08:33:40] timmyBsd: has joined #RubyOnRails
[08:33:52] universa1: mices: are those files loaded?
[08:34:20] mices: i don't know how to tell if show_profile.js is loading
[08:34:25] universa1: mices: what does the browser console look like?
[08:35:06] renegadeandy: has joined #RubyOnRails
[08:35:07] renegadeandy: Can somebody who has used paperclip && || papercrop please take a look here : http://stackoverflow.com/questions/35694968/papercrop-is-not-saving-cropped-image
[08:36:27] universa1: renegadeandy: without having a clue... but without seeing the model + controller code it is basically impossible to help you.
[08:37:08] renegadeandy: Ok, posting them now
[08:37:29] universa1: please put it in a gist, easier to read than stackoverflow
[08:39:30] mices: universal: refresh
[08:39:56] _bogus_: has joined #RubyOnRails
[08:39:59] renegadeandy: universa1: i have added the code
[08:40:11] DEA7TH: has joined #RubyOnRails
[08:40:49] universa1: mices: what are you doing? are you using the asset pipeline?
[08:40:58] AzaToth: has joined #RubyOnRails
[08:41:09] mices: universal: yes
[08:41:10] _bogus_: hi there.. please how can i create a helper to replace the f.text_area, inheriting this standard helper but passing additional options to it?
[08:41:32] universa1: _bogus_: look for creating a custom form builder
[08:41:53] mices: universal: that just means placing files under assets ?
[08:42:03] universa1: _bogus_: http://guides.rubyonrails.org/form_helpers.html#customizing-form-builders
[08:42:17] universa1: mices: !assets
[08:42:17] helpa: mices: http://guides.rubyonrails.org/asset_pipeline.html - The Asset Pipeline Guide by Ryan Bigg, Richard Hulse & Mohammad Typaldos
[08:43:32] blackmes1: has joined #RubyOnRails
[08:43:40] _bogus_: universa1, thanks
[08:43:43] _bogus_: ill check it out
[08:45:32] antgel: has joined #RubyOnRails
[08:46:16] Pupeno: has joined #RubyOnRails
[08:46:18] Chagel_: has joined #RubyOnRails
[08:46:30] universa1: renegadeandy: what are your paperclip storage opts? i'm actually doubtful that the setup with the storage opts works in production.
[08:46:42] renegadeandy: i think it does…?
[08:46:52] mices: universal: i'm using gems uglifier, sass-rails and coffee-rails and i have files under app/assets, so am i using the asset pipeline? you tell me
[08:47:46] universa1: mices: if you are using the asset pipeline, why are you manually loading files with script tags? why are you loading jquery from a remote location, when it is most likely still in your application.js
[08:47:49] renegadeandy: universa1: please refresh :)
[08:48:13] universa1: renegadeandy: :processor => [ :cropper,:papercrop ], ?
[08:48:49] renegadeandy: what should it be then?
[08:49:02] universa1: why do you have cropper and papercrop?
[08:49:20] renegadeandy: originally had cropper
[08:49:27] mices: universal: because that's what it says to do here https://github.com/blueimp/Gallery/blob/master/README.md#setup, it doesn't question if i'm using the asset pipeline or not
[08:49:27] renegadeandy: and thought you could chain processors
[08:49:56] universa1: mices: o0... you need to adopt the code to the rails conventions...
[08:50:09] universa1: mices: please read the asset pipeline guide fully ;)
[08:50:28] universa1: renegadeandy: you can, but why do you have two croppers? they most likely interfere with each other.
[08:50:41] mices: universal: my other js files work
[08:50:54] Oog: has joined #RubyOnRails
[08:51:08] helpa: http://i.imgur.com/m9m3wr9.gif
[08:51:59] bronson: has joined #RubyOnRails
[08:52:03] siaW: has joined #RubyOnRails
[08:53:53] r0bby_: has joined #RubyOnRails
[08:53:58] sash__: has joined #RubyOnRails
[08:54:43] sp1rs: has joined #RubyOnRails
[08:54:52] renegadeandy: universa1: well i tried removing :cropper, which made no difference same output : https://gist.github.com/renegadeandy/eeaef210e2d1bd2383b5
[08:55:09] Eswar: has joined #RubyOnRails
[08:55:14] mices: universal: the asset pipeline is enabled by default in all rails apps
[08:55:34] sevenseacat: mices: i think he knows that.
[08:55:55] mices: sevenseacat: he asked if i was using the asset pipeline
[08:56:04] sevenseacat: and you didnt answer the question
[08:56:06] blackhuey: has joined #RubyOnRails
[08:56:12] universa1: renegadeandy: https://gist.github.com/renegadeandy/eeaef210e2d1bd2383b5#file-gistfile1-txt-L25
[08:56:36] universa1: renegadeandy: can you add the full controller to the gist please?
[08:56:42] sevenseacat: just because its enabled by default, doesnt mean you're using it
[08:56:58] stannard: has joined #RubyOnRails
[08:57:16] mices: sevenseacat: since i didn't use the --skip-sprockets switch when i ran "rails new appname", i'm using it
[08:57:50] sevenseacat: its either laugh, or cry
[08:58:28] universa1: mices: ok, so i bought this fancy cooking pot, but it sits in storage all the time... ...am i using it?
[08:58:42] renegadeandy: universa1: https://gist.github.com/renegadeandy/eeaef210e2d1bd2383b5 - this is on the ‘activity_image_crop’ step
[09:00:17] universa1: renegadeandy: whoa.... why is paperclip deleting stuff?
[09:00:41] universa1: renegadeandy: full log, until the rendered bla bla line ;)
[09:00:49] snowy: has joined #RubyOnRails
[09:01:21] universa1: renegadeandy: https://gist.github.com/renegadeandy/eeaef210e2d1bd2383b5#file-gistfile1-txt-L25-L29
[09:01:44] universa1: renegadeandy: the log entry for one reuqest ends with a line like RENDERED some/file in XXXms or alike ;)
[09:02:01] mark2: has joined #RubyOnRails
[09:02:21] renegadeandy: universa1: gotcha : https://gist.github.com/renegadeandy/eeaef210e2d1bd2383b5
[09:02:40] renegadeandy: i do have a delete_all in the controller on images, but not on this call, so its not being triggered.
[09:03:26] universa1: renegadeandy: well something is deleting the files ;)
[09:03:50] renegadeandy: well…..the image is still saved somewhere :/
[09:03:54] renegadeandy: because it does show
[09:03:57] renegadeandy: it just shows the original
[09:04:01] renegadeandy: so its not deleting everything
[09:04:20] renegadeandy: maybe its tidying up after re-cropping all 4 styles and making 4 new files
[09:04:24] renegadeandy: so it deletes the 4 old files
[09:04:41] renegadeandy: but it just so happens that the 4 new files, are the same as the old
[09:04:44] universa1: renegadeandy: i'd create a dummy app with a simple model and a plain, simple controller
[09:04:50] universa1: renegadeandy: and then make it work there first
[09:05:02] r0bby_: has joined #RubyOnRails
[09:05:55] universa1: renegadeandy: gonna do that now, i'm curios and might need cropping at some poitn ;)
[09:06:04] mices: universal: all files listed as //= require in application.js are supposed to be found/located where?
[09:06:28] r0bby_: has joined #RubyOnRails
[09:06:30] pawnbox: has joined #RubyOnRails
[09:06:36] renegadeandy: universa1: well..i thikn this is just paperclips behaviour on update
[09:06:40] renegadeandy: it deletes the old files
[09:06:50] renegadeandy: writes new, deletes old
[09:07:07] universa1: renegadeandy: ok :-)
[09:07:28] renegadeandy: hmm, if you find something out - can you report back to the stack overflow?
[09:07:35] renegadeandy: I have also made an issue on the github
[09:08:00] tvw: has joined #RubyOnRails
[09:08:20] arup_r: has joined #RubyOnRails
[09:08:35] r0bby_: has joined #RubyOnRails
[09:09:00] r0bby_: has joined #RubyOnRails
[09:09:18] Pupeno: has joined #RubyOnRails
[09:10:41] adre: has joined #RubyOnRails
[09:12:12] tomoyuki28jp: has joined #RubyOnRails
[09:12:25] robbyoconnor: has joined #RubyOnRails
[09:12:31] vedu: I want to use the method http://api.rubyonrails.org/classes/ActiveRecord/Migration.html#method-i-say_with_time . what should I `require` ? require 'active_record/migration' doesn't work
[09:12:46] vedu: Or I am doing something wrong
[09:13:15] robbyoconnor: has joined #RubyOnRails
[09:14:49] FooMunki: has joined #RubyOnRails
[09:17:02] trosborn: has joined #RubyOnRails
[09:18:00] jsrn_: has joined #RubyOnRails
[09:18:05] laith: has joined #RubyOnRails
[09:18:21] public_class: has joined #RubyOnRails
[09:18:22] jenrzzz: has joined #RubyOnRails
[09:19:08] lyoshajapan: has joined #RubyOnRails
[09:19:59] dionysus69: has joined #RubyOnRails
[09:20:33] mices: has left #RubyOnRails: ("Leaving")
[09:21:25] arup_r: vedu: show your gist.. to see why our attempt is not working ?
[09:24:42] allcentury: has joined #RubyOnRails
[09:24:49] Devalo: has joined #RubyOnRails
[09:25:00] vedu: arup_r: https://gist.github.com/vedant1811/c04e705d8779b9403a82
[09:27:21] arup_r: vedu: why you are using migration inside the seeds.rb fiel ?
[09:28:12] arup_r: seeds to intialize the app with some preloaded data, not to run migrations..
[09:28:26] vedu: arup_r: just for the debug statements: https://gist.github.com/vedant1811/c04e705d8779b9403a82
[09:28:32] arup_r: use `puts`
[09:29:10] arup_r: vedu: they work inside the migrations methods like #up, #down,.. check here http://api.rubyonrails.org/classes/ActiveRecord/Migration.html
[09:29:20] arup_r: vedu: for your case, just use `puts`
[09:30:28] Ergo: has joined #RubyOnRails
[09:30:55] chouhoulis: has joined #RubyOnRails
[09:30:56] vedu: arup_r: I want the say_with_time. Much better. Anyway, I'm fine with prepending ActiveRecord::Migration
[09:31:23] adre: has joined #RubyOnRails
[09:31:27] rakm: has joined #RubyOnRails
[09:32:27] tetraktys: has joined #RubyOnRails
[09:32:37] j3r0: has joined #RubyOnRails
[09:34:08] cnrroxx: has joined #RubyOnRails
[09:35:20] arBmind: has joined #RubyOnRails
[09:39:13] snowy: has joined #RubyOnRails
[09:39:39] universa1: vedu: def say_with_time text; AR::M.say_with_time m; end
[09:40:10] j3ffbzh: has joined #RubyOnRails
[09:40:54] vedu: universa1: yeah. seems like the only way. So I will stick with what I have right now :)
[09:43:01] junzay: has joined #RubyOnRails
[09:43:07] universa1: vedu: ok. https://github.com/rails/rails/blob/4d2b6db0038f52ff83403d1e455053a38b74e0ea/activerecord/lib/active_record/migration.rb#L631 -- since you only wnat the one method, defining your own method is the best thing imho. it won't conflict with your other code, the file only gets loaded on db:seed
[09:43:59] Macaveli: has joined #RubyOnRails
[09:44:33] sp1rs: has joined #RubyOnRails
[09:45:13] sash__: has joined #RubyOnRails
[09:45:14] junzay_ror: has joined #RubyOnRails
[09:45:49] Lingo: has joined #RubyOnRails
[09:46:23] adre: has joined #RubyOnRails
[09:46:32] lyoshajapan: has joined #RubyOnRails
[09:47:33] Spami: has joined #RubyOnRails
[09:49:05] Lann: has joined #RubyOnRails
[09:49:16] gregf_: has joined #RubyOnRails
[09:49:18] snowy: has joined #RubyOnRails
[09:50:12] jenrzzz: has joined #RubyOnRails
[09:50:55] artto: has joined #RubyOnRails
[09:52:48] tetraktys: has joined #RubyOnRails
[09:53:18] Macaveli: has joined #RubyOnRails
[09:54:25] kmckelvin: has joined #RubyOnRails
[09:55:33] djbkd: has joined #RubyOnRails
[09:56:38] mark4: has joined #RubyOnRails
[09:57:37] mark2: has joined #RubyOnRails
[09:59:28] ferr: has joined #RubyOnRails
[09:59:53] ferr: How do I generate multi word model name or shall I do everything manually?
[10:00:16] ferr: rails g model OtherVehicle or rails g model other_vehicle does not work
[10:00:25] universa1: ferr: define does not work
[10:00:52] mark4: has joined #RubyOnRails
[10:00:55] sevenseacat: both will work :)
[10:01:02] olle: has joined #RubyOnRails
[10:01:10] ferr: NameError: uninitialized constant OtherVehicle
[10:01:26] universa1: ferr: add the full output from the console please.
[10:02:05] ferr: I'm sorry, I've did everything to rails console, lol
[10:02:24] mark4: has joined #RubyOnRails
[10:02:32] universa1: ferr: ;-) happens to the besdt
[10:03:16] ferr: I love this
[10:03:26] ferr: I've started working as rails programmer having no experience
[10:03:28] marr: has joined #RubyOnRails
[10:03:35] ferr: And I can communicate here and get help as well
[10:04:38] adre: has joined #RubyOnRails
[10:09:33] junzay_ror: I just started with ror
[10:09:49] junzay_ror: I wanted to get a beginner bug to solve
[10:09:53] lyoshajapan: has joined #RubyOnRails
[10:10:03] junzay_ror: Can you help me with that
[10:10:17] ferr: Feel free to ask
[10:10:30] olle: has left #RubyOnRails: ()
[10:10:43] ql6wlld: has joined #RubyOnRails
[10:10:59] jeanlinux: has joined #RubyOnRails
[10:11:17] olleolleolle: has joined #RubyOnRails
[10:11:46] n008f4g_: has joined #RubyOnRails
[10:11:47] junzay_ror: On the issue tracker I cannot differentiate a beginner bug to a advance bug
[10:11:59] olleolleolle: Rails 5.0beta3: What's the recommended way of installing a new parameter parser? We used to manipulate DEFAULT_PARSER in-place. Now, with beta3, the ActionDispatch::Request.parameter_parser does not get our newly-freedom-patched-in symbol in that hash. https://github.com/cerebris/jsonapi-resources/blob/rails5/lib/jsonapi/mime_types.rb is how we used to do it, in Rails5.0 beta2.
[10:12:22] junzay_ror: I want to solve a beginner bug to get started with contributing
[10:13:07] universa1: junzay_ror: there is no one categorizing bugs by difficulty
[10:13:11] sp1rs: has joined #RubyOnRails
[10:13:22] universa1: junzay_ror: easiest are probably contributions to documentation / guides.
[10:13:31] blackmes1: has joined #RubyOnRails
[10:13:50] adironduck: has joined #RubyOnRails
[10:14:15] junzay_ror: Exactly that is why got stuck
[10:14:25] junzay_ror: So if you could help me with that
[10:14:49] universa1: junzay_ror: i'm sorry, i can't follow you.
[10:15:21] junzay_ror: I want to know where can I get a beginner bug to solve
[10:15:25] arup_r: has joined #RubyOnRails
[10:15:26] universa1: junzay_ror: if you you want to "solve" a ticket, read through the open issues, until you find one you think you can tackle, and then do it.
[10:15:43] universa1: junzay_ror: github.com/rails/rails -> issues
[10:15:44] ElFerna_: has joined #RubyOnRails
[10:16:46] laith: has joined #RubyOnRails
[10:16:50] junzay_ror: There are so many issues
[10:17:47] junzay_ror: Anyway thank you
[10:18:13] universa1: junzay_ror: yep :-) commenting which are just implementation problems, and not real bugs also helps the other maintainers
[10:19:01] ElFerna_: has joined #RubyOnRails
[10:20:57] chagel: has joined #RubyOnRails
[10:21:34] shanemcd_: has joined #RubyOnRails
[10:22:16] FooMunki: has joined #RubyOnRails
[10:22:52] junzay_ror: Okay I'll see :)
[10:23:49] lyoshajapan: has joined #RubyOnRails
[10:24:29] pinkerton: has joined #RubyOnRails
[10:27:57] Pumukel: has joined #RubyOnRails
[10:28:56] msyvich: has joined #RubyOnRails
[10:28:57] uglybandersnatch: has joined #RubyOnRails
[10:29:12] msyvich: Is there a way to configure ActiveSupport test suites so a unit test doesn't exit after the first failed assertion?
[10:30:08] Polysics: question: I have some search pages that have very long query URLs. Is there a way to internally rewrite a request so I can turn /designers/armani into /catalog?search=designer&param=armani&blah=foo WITHOUT doing a redirect?
[10:30:41] Polysics: msyvich: no, but you should not have more than one assertion per spec :) Refactor the common parts out
[10:30:42] Dbugger: has joined #RubyOnRails
[10:30:46] Dbugger: Hello everyone
[10:30:51] Dbugger: Happy monday (if possible) :)
[10:31:05] msyvich: polysics, why do you think so?
[10:31:23] Dbugger: I wanted to ask you fellas something. Do you know if there is anyway to check out in Rails the ping of a host? Something like "Net::Ping("www.google.com")"?
[10:31:30] Polysics: for exactly the question you asked. It makes it difficult to find failures
[10:31:33] msyvich: polysics, i've always thought more assertions are better
[10:31:39] chouhoulis: has joined #RubyOnRails
[10:31:55] Polysics: more assertions per SINGLE 'it' block? Why would it be better?
[10:32:06] msyvich: polysics, what makes them difficult to find? the assertion fails and tells you which it was
[10:32:20] msyvich: polysics, so right away you can inspect the assertion which failed and get to the bottom of it, right?
[10:32:47] tvw: has joined #RubyOnRails
[10:32:51] Polysics: no, I never actually used tests :) What kind of question is that?
[10:33:13] cgfbee: has joined #RubyOnRails
[10:33:15] Polysics: from my personal experience, it's better to have one scenario per "it" block so everything has a proper description
[10:33:34] msyvich: but you haven't actually used tests?
[10:33:40] msyvich: i don't understand :)
[10:34:00] Polysics: makes the rspec output more readable and gives a meaning to all tests. Of course, multiple assertions are unavoidable in cases where you are, say, checking for complex object state
[10:34:03] banister: has joined #RubyOnRails
[10:34:03] universa1: polysics: get /:search/:query => "catalog#search" (or alike)
[10:34:16] msyvich: polysics, i referred to active support. i'm not using spec
[10:34:19] Polysics: I was joking :)
[10:34:43] Polysics: it's still the same idea - each scenario gets a proper description and code is more readable
[10:35:06] Polysics: universa1: what about the other parameters that need to be set?
[10:35:09] Eswar: has joined #RubyOnRails
[10:35:42] universa1: polysics: what other parameter?
[10:35:58] universa1: polysics: your original query only has designers and armani ;)
[10:36:16] Polysics: universa1: but the "translation" I need to happen to a query string has more than one
[10:36:34] arup_r: dbugger: you can make a Net::HTTP request on the url and then read the response back
[10:36:44] Polysics: site.com/catalog?search=designer&param=armani&blah=foo
[10:36:57] universa1: polysics: my example has two... where does blah=foo come from?
[10:37:23] Polysics: it is a parameter I need to set to get the correct result from the search page, it will always be the same parameter
[10:37:48] Dbugger: arup_r, but what I want is the ping time of the server
[10:37:49] universa1: polysics: please don't give fake examples.
[10:38:39] universa1: polysics: so /designers/armani is mapped to the search action in the catalog controller, with params[:search] set to designers, and params[:query] set to armani
[10:38:53] xhoy_: i have a model with papertrail, now i would love to dow model/:id/diff/:version or something, but how do i this in routes.rb? recources :templates do member do get 'diff' (version?!)
[10:38:57] lyoshajapan: has joined #RubyOnRails
[10:38:58] Polysics: universa1: real life example: site.com/designers/christian-loubotin site.com.com/catalog?per_page=&search%5Bselective_brand_any%5D%5B%5D=Christian+Loubotin&utf8=✓
[10:39:15] xhoy_: i cant find any example except defining the full route in de guide
[10:39:20] arup_r: dbugger: http://stackoverflow.com/a/21081715/2767755
[10:39:24] arup_r: use that gem
[10:39:35] universa1: polysics: so add a defaults: {per_page: "..."}
[10:39:40] universa1: polysics: !routing
[10:39:40] helpa: polysics: http://guides.rubyonrails.org/routing.html - Rails Routing From the Outside In - Rails Guide - by Mike Gunderloy
[10:39:43] Polysics: I already have a controller catching the /designers route and doing the translation, though I am not even sure I should not be handling this at the routes level
[10:39:56] Dbugger: arup_r, that is exactly what I was looking at right now, even though i have not managed yet to get the ping time. Just a "true" or "false"
[10:40:27] universa1: polysics: get /:search/:query => "catalog#search", defaults: {per_page: "search selective_brand_any"} (guess coding in irc)
[10:40:28] arup_r: dbugger: check their source code, you may find something.
[10:40:37] arup_r: dbugger: also you can do it by hand
[10:40:44] adaedra: dbugger: note that sending a ping request requires root access. (ping binary is setuid)
[10:40:54] Polysics: universa1: thanks, testing
[10:40:55] xhoy_: universa1: the only example is a full route get /templates/:id/version/:version
[10:41:26] xhoy_: but i hoped for are "more rails solution" :)
[10:41:58] Dbugger: adaedra, I just noticed... :(
[10:42:11] Dbugger: adaedra, that... sucks :(
[10:42:40] adaedra: solutions I tested when I was working on that either required root, either used the ping binary. :T
[10:42:55] universa1: xhoy_: guess coding again: what happens if you do => member do; get "diff/:version"; end or alike
[10:43:20] Dbugger: I guess I have to give up on that. I will do a simple HTTP request, and calculate by hand the request time
[10:43:25] Dbugger: not exactly a ping, but whatever
[10:43:45] xhoy_: universa1: duno, but most of the time there is a good example in the guide :)
[10:43:51] futilegames: has joined #RubyOnRails
[10:44:08] universa1: xhoy_: !try
[10:44:08] helpa: xhoy_: Why don't you try it and find out for yourself?
[10:44:12] xhoy_: universa1: i was trying to not guess coding, and looking for docs (all examples i found )
[10:44:33] universa1: xhoy_: experimentation is also an important part ;)
[10:44:51] xhoy_: universa1: it breaks btw :)
[10:45:35] Ropeney: has joined #RubyOnRails
[10:46:05] norc_: has joined #RubyOnRails
[10:46:34] norc_: Hi, I have the need to execute a custom rake task after test:load to set up some additional tables outside my db/schema.rb.
[10:46:37] sash__: has joined #RubyOnRails
[10:46:46] norc_: Should I simply do this in my spec_helper, or is there some other way?
[10:48:40] chagel: has joined #RubyOnRails
[10:49:48] defsdoor: has joined #RubyOnRails
[10:50:53] xhoy_: universa1: so there is no way of adding sub routes :)
[10:52:20] worknick: has joined #RubyOnRails
[10:52:35] worknick: is it okey to do, Model.where inside my view?
[10:52:55] xhoy_: worknick: you should do that in your controller
[10:53:03] xhoy_: @thing = Model.where()
[10:53:16] xhoy_: worknick: in your view you can dan do @thing.each do |t| ....
[10:53:18] universa1: xhoy_: there probably is.
[10:53:45] norc_: Or let me look at this differently. Where and how are the rake tasks that set up the database for rspec invoked?
[10:53:52] lyoshajapan: has joined #RubyOnRails
[10:54:19] bronson: has joined #RubyOnRails
[10:55:04] artto: has joined #RubyOnRails
[10:56:05] xhoy_: norc_: you can invoke another rake task?
[10:57:25] norc_: xhoy_: I do not want to do this manually every time I want to invoke rspec.
[10:57:45] sp1rs: has joined #RubyOnRails
[10:57:54] xhoy_: norc_: but that would make your tests slow?
[10:58:28] universa1: norc_: ActiveRecord::Migration.maintain_test_schema! is called in rails_helper.rb
[10:58:35] universa1: norc_: no rake task ;)
[10:58:37] arup_r: worknick: o/
[10:59:13] norc_: universa1: Ah. Alright I will have to modify this then. :)
[10:59:29] norc_: Thank you, completely ignored the rails_helper somehow in my research.
[10:59:58] workmad3: has joined #RubyOnRails
[11:00:00] mikecmpbll: has joined #RubyOnRails
[11:00:08] xhoy_: sevenseacat: resoruces :x do member do get 'diff/:id' => :versions end end end
[11:00:23] xhoy_: eeeuh sorry
[11:00:24] xhoy_: universa1: :)
[11:00:35] adaedra: that's quite the tab fail.
[11:00:42] xhoy_: adaedra: yeah :>
[11:01:00] sp1rs: has joined #RubyOnRails
[11:01:01] xhoy_: i life to fail, and fail to life :>
[11:01:15] tetraktys: has joined #RubyOnRails
[11:02:55] norc_: universa1: Awesome, looks like I just have to call ActiveRecord::Tasks::DatabaseTasks.load_schema_for for my additional custom schema (it will not have migrations) in rails_helper afterwards and Im set.
[11:02:58] norc_: Thanks again.
[11:03:23] worknick: arup_r: :-D
[11:03:53] worknick: xhoy_: you meant "live"?
[11:04:12] sp1rs: has joined #RubyOnRails
[11:04:42] xhoy_: worknick: thats why its sow confusing.. http://www.englisch-hilfen.de/en/words/live_life.htm
[11:04:54] universa1: xhoy_: http://stackoverflow.com/questions/4271023/rails3-routes-passing-parameter-to-a-member-route
[11:05:18] xhoy_: universa1: thanks i found that :)
[11:05:32] xhoy_: sorry i mis tab you
[11:05:59] vedu: Hello. I am trying to get my model accepts_nested_attributes_for but even with autosave_associated_records_for_ I am getting validation errors: https://gist.github.com/vedant1811/566a1898ac27b4bb4f73
[11:06:51] sp1rs: has joined #RubyOnRails
[11:06:52] xhoy_: vedu: save?
[11:06:52] rodfersou: has joined #RubyOnRails
[11:07:52] lyoshajapan: has joined #RubyOnRails
[11:07:53] xhoy_: vedu: and, old_location == current location?
[11:08:06] Tempesta: has joined #RubyOnRails
[11:08:18] vedu: xhoy_: the `if location` block is not being called only
[11:09:09] vedu: xhoy_: I am trying to do a find or create location rather than a create everytime
[11:09:13] xhoy_: vedu: and the validation on location?
[11:09:22] xhoy_: vedu: location must be uniq?
[11:09:38] vedu: xhoy_: yes
[11:09:39] xhoy_: vedu: doesn't that happen automagicaly with nested stuff?
[11:10:06] vedu: xhoy_: no. It tries to create a new record: http://stackoverflow.com/questions/3579924/accepts-nested-attributes-for-with-find-or-create
[11:10:26] xhoy_: e = Event.new; e.location.build(name: 'xyz'); e.save would create a new location
[11:11:10] xhoy_: vedu: that part of rails did change a lot last view versions
[11:11:28] GeorgesLeYeti: has joined #RubyOnRails
[11:12:17] GeorgesLeYeti: has joined #RubyOnRails
[11:12:46] aganov: has joined #RubyOnRails
[11:13:10] emachnic: has joined #RubyOnRails
[11:13:59] vedu: xhoy_: and? I don't understand why my method is being called without arguments and why the deafult behaviour is running even though I have defined the method
[11:14:13] scepticulous: I want to write a test, that verifies that deep_munge has been disabled. however when i send author: { name: 'new name', posts: [] } in my request spec, the empty post parameter does not appear in the controller. as if the test would not even send it. deep munge would convert it to nil, but I dont even get the key in the test
[11:14:14] allcentury: has joined #RubyOnRails
[11:14:20] xhoy_: (old_location = Location.find_by(name: location.name)) <<<
[11:14:22] ebbflowgo: has joined #RubyOnRails
[11:14:25] xhoy_: == to compair
[11:14:36] xhoy_: then its alwasy true i think?
[11:14:36] scepticulous: the same does not happen in development, there i can see deep munge converting or not converting, depending on the configuration.
[11:14:46] workmad3: vedu: it re-uses and updates the originally record if the nested attributes contain `id` fields (which are added automatically with `fields_for` over a collection)
[11:14:48] bookies: has joined #RubyOnRails
[11:15:11] ltd_: Hey guys, anyone know how to workaround the issue with Rails 4 / postgres with INET/CIDR type being mapped to the ruby IPAddr class which clobbers the right-most host bits of the IPaddr when there is < 32bit mask
[11:15:48] vedu: workmad3: oh yes. That I know. But I would rather query by name :(
[11:15:51] xhoy_: ltd_: you loos the last bit of the adres?
[11:16:04] xhoy_: vedu: i dont think your if should be with a single = ?
[11:16:12] workmad3: vedu: then you'll need to mess around with a custom setter for the _attributes= method
[11:16:37] ltd_: xhoy_: yeah, if you do an i=IPAddr.new('1.0.0.1/24') i.to_s shows 1.0.0.0/24, the right most bits are lost
[11:16:56] GeorgesLeYeti: I have a question about designing my database. A user can send a video file and can select different options (for example correction, translation...). Should I make a boolean for each option in my Video table or is it better to make an Option table and a VideoOptions table ?
[11:17:02] bookies: I want users to be able to edit a model through a token. I create a token which I want to use as a link similar to "http://railsappexample.com/merchants/token-124512/edit" . How do I create this link for sending it to user by email? The normal one with id is <%= link_to "link", edit_merchant_path(@merchant, :only_path => false) %>
[11:17:19] xhoy_: ltd_: never used that gem but sounds like a stupid thing!
[11:17:40] ltd_: xhoy_: it's not a gem, it's part of ruby core lib
[11:17:46] xhoy_: ltd_: oooow
[11:17:50] granden: has joined #RubyOnRails
[11:18:00] loechel: has joined #RubyOnRails
[11:18:04] xhoy_: ltd_: when you give it a /24 its returning the range not the IP
[11:18:19] ltd_: xhoy_: yeah, it's inherenly broken IMHO.
[11:18:25] vedu: workmad3: and I just tried with id = ; but I get an error: ActiveRecord::RecordNotFound: Couldn't find Location with ID=980190962 for Model
[11:18:32] xhoy_: if you like to store an IP you need ot do /32
[11:18:32] norc_: GeorgesLeYeti: Kind of depends on your goal.
[11:18:47] xhoy_: since you now request to store a range, not a single ip
[11:19:08] worknick: is there any delete_all similar to delete the "very latest" record i just created in db?
[11:19:09] ltd_: xhoy_: if that's the intent of ipdadr, then yes, the brokenness is Rails mapping the INET/CIDR types to IPAddr
[11:19:11] norc_: GeorgesLeYeti: Another alternative is storing a YAML encoded hash in a string. Not saying it is better, but just another approach.
[11:19:15] xhoy_: ltd_: for a single ip you can do '10.0.1.1' (without the range)
[11:19:15] worknick: belonging to specific user
[11:19:32] ltd_: xhoy_: since the postgres type stores address and mask together, not just network and mask
[11:19:36] xhoy_: ltd_: >> IPAddr.new('10.0.0.1/24')
[11:19:36] xhoy_: #<IPAddr: IPv4:10.0.0.0/255.255.255.0>
[11:19:49] xhoy_: its even in de ruby doc
[11:20:05] ltd_: xhoy_: I understand what IPAddr is doing, the problem is Rails type mapping using it
[11:20:11] GeorgesLeYeti: norc_, Ok didn't know this approch.
[11:20:28] xhoy_: ltd_: where is rails using that?
[11:20:41] workmad3: xhoy_: in the mapping of postgres ipaddr types
[11:20:44] ltd_: xhoy_: postgres INET/CIDR types are converted to IPAddr class
[11:21:00] GeorgesLeYeti: currently I have 4 options for my video but maybe latter I'll have more options.
[11:21:17] norc_: GeorgesLeYeti: If you want preset options, perhaps even configurable through the website, placing them into a polymorphic association table is probably the most flexible way.
[11:21:18] xhoy_: found it :) http://edgeguides.rubyonrails.org/active_record_postgresql.html
[11:21:32] artto: has joined #RubyOnRails
[11:21:42] norc_: GeorgesLeYeti: If you want them to be completely custom for each video, using something like YAML inside a string column is really nice.
[11:22:00] olleolleolle: Anyone wondering - https://github.com/cerebris/jsonapi-resources/pull/642 is how to register a new parameter parser.
[11:22:05] norc_: GeorgesLeYeti: If you just have 2-3 options and they are the same for all and do not expect this to become much more, use boolean columns.
[11:22:10] xhoy_: ltd_: https://github.com/rails/rails/issues/11552
[11:22:13] universa1: norc_, GeorgesLeYeti: instead of yaml in a string column => hstore / json datatype in postgres
[11:22:24] norc_: Oh indeed. :)
[11:23:08] ltd_: xhoy_: yes, converting to IPAddr that is another consequence
[11:23:13] ltd_: xhoy_:but unrelated
[11:24:26] GeorgesLeYeti: universa1, sorry but I don't understand. You mean storing a Json instead of a yaml ?
[11:24:45] norc_: GeorgesLeYeti: postgres has native support for hstore/json
[11:24:45] workmad3: ltd_: as a workaround, you could use the `_before_type_cast` version of the attribute getter to grab the raw value and do what you want with it
[11:25:17] GeorgesLeYeti: ok I'll look this way then. I don't know what is hstore
[11:25:18] bookies: I want users to be able to edit a model through a different url that the default one that includes a token. I create and store a token which I want to use as a link similar to "http://railsappexample.com/merchants/token-124512/edit" . How do I create this link for sending it to user by email? The default link with id is <%= link_to "link", edit_merchant_path(@merchant, :only_path => false) %>. How would the one with token be li
[11:25:38] ltd_: workmad3: interested, could you run me through how that would look?
[11:25:49] norc_: GeorgesLeYeti: Note that such dependencies lock your users into PostgreSQL though.
[11:26:00] workmad3: ltd_: ip_address_string = some_model.ip_addr_attr_before_type_cast
[11:26:37] workmad3: ltd_: ip_address_string will then contain the raw value from the result set, rather than an IPAddr object
[11:26:39] ltd_: workmad3: that easy? does that work for assignment too?
[11:26:49] pydave6367: has joined #RubyOnRails
[11:26:53] olleolleolle: has left #RubyOnRails: ()
[11:26:56] workmad3: ltd_: not sure on assignment I'm afraid
[11:27:05] ltd_: since setting the value ultimately breaks the ip again too
[11:27:12] workmad3: but you could try it :)
[11:27:18] GeorgesLeYeti: norc_, universa1 Ty a lot
[11:27:24] ltd_: workmad3: I shall, thanks
[11:27:49] gavit_: has left #RubyOnRails: ()
[11:28:03] gavit: has joined #RubyOnRails
[11:28:07] gavit: I'm trying to make an SimpleInput Custom input, the idea is to have a list and send an array as param. I tried this, but I dont even get an array as a result, and I can only select 1 item https://gist.github.com/gavit/02a5c381eb7dcdf66918
[11:28:37] jsrn_: has joined #RubyOnRails
[11:28:43] Zadrel: has joined #RubyOnRails
[11:29:46] Guest6988: has joined #RubyOnRails
[11:30:38] banister: has joined #RubyOnRails
[11:31:18] BaNzounet: Hey guys, we want to deploy our app to another country(name,homepage and some stuff here and there will be different), what would you recommand? Basicly we want to have the same base app with only a few stuff overriden
[11:31:54] lipoqil: has joined #RubyOnRails
[11:32:28] chouhoulis: has joined #RubyOnRails
[11:32:31] lyoshajapan: has joined #RubyOnRails
[11:34:07] laith: has joined #RubyOnRails
[11:35:03] norc_: BaNzounet: I18n
[11:35:12] delgiudices: has joined #RubyOnRails
[11:37:37] laith1: has joined #RubyOnRails
[11:40:47] arup_r: GeorgesLeYeti: o/
[11:41:06] smoitra: has joined #RubyOnRails
[11:43:20] Pumukel: has joined #RubyOnRails
[11:43:32] ldnunes: has joined #RubyOnRails
[11:44:06] kgutteridge: has joined #RubyOnRails
[11:44:15] allcentury: has joined #RubyOnRails
[11:47:41] tetraktys: has joined #RubyOnRails
[11:50:09] loechel: has joined #RubyOnRails
[11:50:57] lyoshajapan: has joined #RubyOnRails
[11:51:43] Cervajz: has joined #RubyOnRails
[11:52:28] defsdoor: has joined #RubyOnRails
[11:52:32] M-shine: has joined #RubyOnRails
[11:53:33] shanemcd_: has joined #RubyOnRails
[11:56:49] trinaldi: has joined #RubyOnRails
[11:59:32] augcesar: has joined #RubyOnRails
[12:00:24] adre: has joined #RubyOnRails
[12:03:09] banister: has joined #RubyOnRails
[12:03:28] Pumukel: has joined #RubyOnRails
[12:04:34] jeanlinux: has joined #RubyOnRails
[12:06:05] lyoshajapan: has joined #RubyOnRails
[12:06:08] joshkovach: has joined #RubyOnRails
[12:06:47] _Tariq: has joined #RubyOnRails
[12:07:11] ebbflowgo: has joined #RubyOnRails
[12:07:41] ebbflowgo: has left #RubyOnRails: ()
[12:08:20] IanMalcolm: has joined #RubyOnRails
[12:08:21] Lann: Anyone want a free Dell R815 server: 64GB ram, 2x 15k SAS drives, 4 12 core opteron 2.2ghz (48 cores total) on silicon valley colo? Take over my 11 mo hosting contract at $140/mo. Bandwidth: 10Mbps @ 100Mbps 95%
[12:09:32] augcesar: has joined #RubyOnRails
[12:09:37] CornishPasty: > free > $140/mo
[12:11:39] defsdoor: has joined #RubyOnRails
[12:12:46] ebbflowgo: has joined #RubyOnRails
[12:12:51] alexhart_: has joined #RubyOnRails
[12:12:57] njero: Hello.. I'm want a model attribute with limited no of states(say 3). In a performance perspective, which will be good? a char(1) or integer..
[12:13:24] njero: I meant for both selection and comparisons...
[12:13:46] norc_: n_e_o: Use an integer column with AR enums.
[12:14:05] ebbflowgo: has left #RubyOnRails: ()
[12:15:50] Eswar: has joined #RubyOnRails
[12:15:51] njero: norc_: so char(1) doesn't have a performance gain over integer?
[12:16:17] norc_: n_e_o: Have you profiled your code and optimize to find that particular column to be a significant bottleneck to your performance?
[12:16:59] norc_: n_e_o: If not, pick whats elegant and descriptive. enums integrate nicely everywhere, with matchers in shoulda-matchers, they integrate into things like simple_form.
[12:17:01] gaf_: has joined #RubyOnRails
[12:17:13] Cervajz_: has joined #RubyOnRails
[12:17:16] ElFerna_: has joined #RubyOnRails
[12:17:32] njero: norc_: not yet complete with tests..
[12:17:38] norc_: n_e_o: Then ignore performance.
[12:17:46] norc_: Write code that works, write tests for your code, profile, optimize.
[12:17:48] norc_: In that order.
[12:18:04] norc_: (Or better yet do the first two together at the same time)
[12:18:44] Macaveli: has joined #RubyOnRails
[12:18:45] njero: norc_: yeah.. i wish so.. But new features are coming along.. couldn't carry tests..
[12:19:01] norc_: n_e_o: Slow down your development speed and integrate tests.
[12:19:10] norc_: Each time you write a class or non-trivial method, add a test.
[12:20:51] njero: norc_: I'm looking into it.. I should be able to do that once this part is done..
[12:21:16] artto: has joined #RubyOnRails
[12:23:10] lele: has joined #RubyOnRails
[12:23:18] Dbugger: I have a problem... I do this every 60 seconds: "http://hastebin.com/iwibakaziw.vbs". The time is mostly 100ms, but somehow, every 3 to 5 requests, it goes up to 5 seconds. Why is that???
[12:23:30] arup_r: has joined #RubyOnRails
[12:23:59] lyoshajapan: has joined #RubyOnRails
[12:26:06] yogeshrt: has joined #RubyOnRails
[12:27:14] adre: has joined #RubyOnRails
[12:27:49] pinkerton: has joined #RubyOnRails
[12:28:05] gaf_: has joined #RubyOnRails
[12:30:06] sandstrom: has joined #RubyOnRails
[12:30:56] MrDoctor: has joined #RubyOnRails
[12:32:01] delgiudices: has joined #RubyOnRails
[12:32:45] tvw: has joined #RubyOnRails
[12:33:11] chouhoulis: has joined #RubyOnRails
[12:33:45] Palsson: has joined #RubyOnRails
[12:35:05] ElFerna_: has joined #RubyOnRails
[12:35:16] herbst: has joined #RubyOnRails
[12:36:05] kgutteridge: has joined #RubyOnRails
[12:36:37] universa1: dbugger: please use gist.github.com
[12:36:44] Dbugger: universa1, sure
[12:37:12] Dbugger: universa1, this is it: https://gist.github.com/enriquemorenotent/b441dd510f4405133512
[12:37:35] peterppp: has joined #RubyOnRails
[12:38:02] peterppp: I find myself wishing that I could supply defaults for strong parameters. Am I doing something wrong?
[12:38:15] cnr_roxx: has joined #RubyOnRails
[12:38:19] sp1rs: has joined #RubyOnRails
[12:39:04] pawnbox: has joined #RubyOnRails
[12:40:30] pawnbox: has joined #RubyOnRails
[12:40:53] defsdoor: has joined #RubyOnRails
[12:41:20] berserk_ren: has joined #RubyOnRails
[12:41:36] quazimodo: has joined #RubyOnRails
[12:42:00] _Tariq: has joined #RubyOnRails
[12:42:46] Spami: has joined #RubyOnRails
[12:42:53] granden: has joined #RubyOnRails
[12:46:44] universa1: peterppp: the model should handle default values
[12:46:48] universa1: not some controller ;)
[12:48:44] msyvich: has joined #RubyOnRails
[12:49:31] tbuehlmann: peterpp, yeah, you sometimes have to inject data. I'm going with this: https://gist.github.com/tbuehlmann/3a6ea6422e7be39b8fbf
[12:49:55] peterppp: for some things such as search forms I don't have a model
[12:50:26] peterppp: and I'm not sure how to deal with those cases without making a mess in my controllers
[12:50:39] Snowy_: has joined #RubyOnRails
[12:51:19] universa1: peterppp: hmm, you could create a table-less poro ;)
[12:51:37] universa1: plain old ruby object
[12:51:50] universa1: service classes for search might be something else
[12:54:34] diegoviola: has joined #RubyOnRails
[12:55:43] peterppp: so would you create a model for something such as a search form and define a method such as get_results?
[12:57:06] artto: has joined #RubyOnRails
[12:58:19] stannard: has joined #RubyOnRails
[12:58:40] laith: has joined #RubyOnRails
[12:58:43] MrDoctor: has joined #RubyOnRails
[12:59:26] ldnunes: has joined #RubyOnRails
[12:59:46] worknick: peterppp: i dont think so.
[12:59:55] worknick: just a custome method in that particular model is fine.
[13:01:22] emachnic: has joined #RubyOnRails
[13:05:36] Sigfrid: has joined #RubyOnRails
[13:06:25] defsdoor: has joined #RubyOnRails
[13:08:09] krzkrzkrz: has joined #RubyOnRails
[13:08:51] ferr: Everytime I submit this form with nested fields, my other_vehicles count doubles, any ideas? https://gist.github.com/anonymous/c4a77d1e2569f5c88bd1
[13:11:19] jeanlinux: has joined #RubyOnRails
[13:11:51] pawnbox: has joined #RubyOnRails
[13:12:25] pinkerton: has joined #RubyOnRails
[13:13:16] sash__: has joined #RubyOnRails
[13:14:20] openstruct: has joined #RubyOnRails
[13:14:25] johnflux_: has joined #RubyOnRails
[13:16:29] chrisarc1nd: has left #RubyOnRails: ()
[13:17:10] chrisarcand: has joined #RubyOnRails
[13:17:13] banister: has joined #RubyOnRails
[13:17:25] marr: has joined #RubyOnRails
[13:18:14] jarib_: has joined #RubyOnRails
[13:18:57] lyoshajapan: has joined #RubyOnRails
[13:20:46] differentreality: has joined #RubyOnRails
[13:21:41] Pumukel: has joined #RubyOnRails
[13:21:46] Marquel: has joined #RubyOnRails
[13:21:46] Marquel: has joined #RubyOnRails
[13:22:02] yogeshrt: has joined #RubyOnRails
[13:22:19] ctrlrsf: has joined #RubyOnRails
[13:23:07] IFrank00: has joined #RubyOnRails
[13:24:11] peterppp: IFrank00, hi
[13:24:17] AntiSpamMeta: has joined #RubyOnRails
[13:24:42] ferr: Everytime I submit this form with nested fields, my other_vehicles count doubles, any ideas? https://gist.github.com/anonymous/c4a77d1e2569f5c88bd1 I believe I need somewhere to set the other_vehicles ID
[13:24:47] westoque: has joined #RubyOnRails
[13:24:49] Ergo: has joined #RubyOnRails
[13:24:54] westoque: has left #RubyOnRails: ()
[13:26:25] jeanlinux: has joined #RubyOnRails
[13:26:39] Ropeney: has joined #RubyOnRails
[13:27:44] dkam_: has joined #RubyOnRails
[13:29:25] goodcodeguy: has joined #RubyOnRails
[13:29:42] delgiudices: has joined #RubyOnRails
[13:30:08] vedu: has joined #RubyOnRails
[13:32:20] nogic: has joined #RubyOnRails
[13:32:59] finnnnnnnnnnn: has joined #RubyOnRails
[13:33:44] nogic: has joined #RubyOnRails
[13:33:49] finnnnnnnnnnn: This should be easy. How do I add a css class to a submit button? <%= f.submit, class: ‘foo’ %>
[13:33:54] chouhoulis: has joined #RubyOnRails
[13:34:38] nogic: has joined #RubyOnRails
[13:35:53] nogic: has joined #RubyOnRails
[13:36:08] finnnnnnnnnnn: got it, need to add a string for the label - <%= f.submit “this can’t be blank”, class: “foo" %>
[13:36:58] nogic: has joined #RubyOnRails
[13:37:19] herbst: has joined #RubyOnRails
[13:37:37] banister: has joined #RubyOnRails
[13:37:45] johnflux: has joined #RubyOnRails
[13:37:45] johnflux: has joined #RubyOnRails
[13:39:16] msyvich: has joined #RubyOnRails
[13:39:26] Guest34101: has joined #RubyOnRails
[13:41:29] moeabdol: has joined #RubyOnRails
[13:41:36] comm64x: has joined #RubyOnRails
[13:41:50] lyoshajapan: has joined #RubyOnRails
[13:42:59] emachnic: has joined #RubyOnRails
[13:43:13] artto: has joined #RubyOnRails
[13:43:29] comm64x: I'm running into a problem in using an engine. I've followed every tutorial and the guides concerning engines but when I go to bundle in the host application bundle doesnt seem to be able to find my engine
[13:44:25] comm64x: Could not find gem 'api' in source at `../api/`.
[13:44:26] comm64x: Source does not contain any versions of 'api'
[13:44:42] Palsson: has joined #RubyOnRails
[13:44:50] comm64x: thats all I get
[13:44:56] universa1: comm64x: gist your gemfile please
[13:45:11] quazimodo: has joined #RubyOnRails
[13:46:00] universa1: along with the full error trace
[13:46:32] backbox: has joined #RubyOnRails
[13:46:36] pawnbox: has joined #RubyOnRails
[13:46:47] comm64x: universa1: the Gemfile is the same as a fresh one with the exception that I've added gem 'api', path: '../api/'
[13:47:12] Ropeney: comm64x, then gist it :)
[13:47:34] universa1: comm64x: did you try it with the full path?
[13:48:10] comm64x: not yet but I will now and let you know
[13:49:35] comm64x: universa1: same problem even when using full path
[13:49:41] amiuhle: has joined #RubyOnRails
[13:49:51] shanemcd: has joined #RubyOnRails
[13:50:12] universa1: comm64x: ok
[13:50:29] universa1: comm64x: can you gist the .gemspec or whatever it is called from your api path
[13:50:50] comm64x: yes one moment
[13:52:08] pawnbox: has joined #RubyOnRails
[13:52:31] pinkerton: has joined #RubyOnRails
[13:53:02] flashpoint9: has joined #RubyOnRails
[13:54:47] comm64x: https://gist.github.com/thomascarterx/5f743c0e0bd5e00d8f17#file-gemspec
[13:55:32] Ergo: has joined #RubyOnRails
[13:55:48] diegoviola: has joined #RubyOnRails
[13:55:54] lyoshajapan: has joined #RubyOnRails
[13:56:08] nzst: has joined #RubyOnRails
[13:57:08] bronson: has joined #RubyOnRails
[13:57:57] Ropeney: comm64x, are you on mac or linux?
[13:58:38] universa1: comm64x: so you have an api.gemspec file? ;)
[14:00:09] jmignault: has joined #RubyOnRails
[14:00:14] comm64x: well enginex calls it %underscored%.gemspec
[14:01:27] Ropeney: comm64x, when you put the full path in, did it := when you `pwd` in the api folder?
[14:02:05] Denarii: has joined #RubyOnRails
[14:02:06] comm64x: enginex is the gem I used to generate the engine
[14:02:06] ramortegui: has joined #RubyOnRails
[14:02:32] comm64x: Ropeney: yep
[14:03:16] artto: has joined #RubyOnRails
[14:03:43] comm64x: universa1: I've tried bundling with an engine I made not using enginex and got the same problems...thats why I tried using enginex because I thought maybe I was missing something somewhere
[14:03:47] flashpoint9: has joined #RubyOnRails
[14:04:39] comm64x: I can use gems that themselves make use of engines, like Spree, etc. so I know my rails install can use engines, but every time I try and make an engine myself it wont bundle
[14:05:01] sp1rs: has joined #RubyOnRails
[14:05:40] yogeshrt: has joined #RubyOnRails
[14:09:14] universa1: comm64x: the gemspec file needs to be named "gemname".gemspec
[14:10:46] comm64x: universa1: I tried renaming same issue
[14:11:20] drbayer: has joined #RubyOnRails
[14:12:02] adavia: has joined #RubyOnRails
[14:12:45] _Tariq: has joined #RubyOnRails
[14:13:28] blackmes1: has joined #RubyOnRails
[14:13:31] JoshL: has joined #RubyOnRails
[14:14:16] shanemcd: has joined #RubyOnRails
[14:15:49] lyoshajapan: has joined #RubyOnRails
[14:15:59] fishpercolator: has joined #RubyOnRails
[14:17:22] shanemcd: has joined #RubyOnRails
[14:17:27] _Tariq: has joined #RubyOnRails
[14:20:25] marr: has joined #RubyOnRails
[14:21:05] Jasaka: has joined #RubyOnRails
[14:23:26] workmad3: has joined #RubyOnRails
[14:23:46] dopamean_: has joined #RubyOnRails
[14:24:04] sp1rs: has joined #RubyOnRails
[14:24:16] shanemcd: has joined #RubyOnRails
[14:24:24] marr: has joined #RubyOnRails
[14:24:31] pinkerton: has joined #RubyOnRails
[14:25:31] dstarh: has joined #RubyOnRails
[14:25:52] krzkrzkrz: has joined #RubyOnRails
[14:26:10] allcentury: has joined #RubyOnRails
[14:27:17] VeryBewitching: has joined #RubyOnRails
[14:28:33] lyoshaja_: has joined #RubyOnRails
[14:31:37] RTG`: has joined #RubyOnRails
[14:31:55] DEA7TH: has joined #RubyOnRails
[14:33:20] defsdoor: has joined #RubyOnRails
[14:34:19] groatyoats: has joined #RubyOnRails
[14:34:39] chouhoulis: has joined #RubyOnRails
[14:39:02] diegoviola: has joined #RubyOnRails
[14:43:12] xhoy_: did something "stupid" i created a model "template" but in the view Template is taken... just rename my model?
[14:43:42] siaW: has joined #RubyOnRails
[14:44:10] dkam_: has joined #RubyOnRails
[14:44:52] Eswar: has joined #RubyOnRails
[14:45:02] emachnic: has joined #RubyOnRails
[14:46:19] akshat: has joined #RubyOnRails
[14:46:51] xploshioon: has joined #RubyOnRails
[14:50:46] arup_r: I am trying to put custom validations like app/validators/lead/, app/validators/room/ like that. But model are not able to detect those. It works only when I keep them inside the app/validators directory. How can I organize them as I said ?
[14:51:04] arup_r: Lead, Room they are model names..
[14:51:13] pydave6367: has joined #RubyOnRails
[14:52:06] stannard: has joined #RubyOnRails
[14:53:24] njero: has joined #RubyOnRails
[14:54:38] laith: has joined #RubyOnRails
[14:54:44] stannard: has joined #RubyOnRails
[14:54:46] sp1rs: has joined #RubyOnRails
[14:57:42] xploshioon: hello guys, how are you? I have a problem, I am using this gem https://github.com/ritxi/sermepa_web_tpv/blob/master/lib/sermepa_web_tpv/request.rb and need the signature to be in the options or in another variable, but I can't understand how to do it, the options are filled correctly, but I need the signature too, if I try with variable.signature it says is a private method, can you tell me what is the way? thanks
[14:59:25] yellow5: has joined #RubyOnRails
[15:01:00] FooMunki: has joined #RubyOnRails
[15:01:41] uglybandersnatch: has joined #RubyOnRails
[15:02:52] DmitryBochkarev: has joined #RubyOnRails
[15:03:50] ElFerna_: has joined #RubyOnRails
[15:04:13] Hates__: has joined #RubyOnRails
[15:04:37] Hates__: has left #RubyOnRails: ()
[15:05:31] Hates_: has joined #RubyOnRails
[15:05:37] Hates_: !botsnack
[15:05:37] helpa: Nom nom. Thanks, Hates_!
[15:06:01] aegis3121: has joined #RubyOnRails
[15:06:38] xploshioon: @arup_r I am not an expert and maybe I am wrong but something like this maybe can help config.autoload_paths += Dir["#{config.root}/app/validators/**/"] maybe the path is wrong but you can start from that... I think... hahaha
[15:06:57] kgutteridge: has joined #RubyOnRails
[15:07:30] rubyonrailed: has joined #RubyOnRails
[15:08:36] arup_r: actually rails autoloads any files under app/directories. But if you go one more level nesting it doesn't. Yeah, that way as you said might work, but any other tricks.. Or my main question is why it autoloads only one level
[15:09:33] adaedra: iirc, rails autoloading is based on file names, so if you want something in a subdirectory, you have to name the classes in a namespace corresponding to the folder (Foo::Bar => foo/bar.rb)
[15:10:16] trifling-jest: has joined #RubyOnRails
[15:10:36] Hates_: more levels should be autoloaded
[15:10:58] ferr: My partials for other_vehicles are loaded fine each in new panel, however, when I click button to add the new vehicle, it is rendered inside one of the panel, and If u click more, it gets into the latest panel: https://gist.github.com/Fercell/69a06518d9844fa39c27
[15:11:20] trifling-jest: is there a problem with turbolinks currently with regards to redirecting?
[15:11:25] xploshioon: hello guys, how are you? I have a problem, I am using this gem https://github.com/ritxi/sermepa_web_tpv/blob/master/lib/sermepa_web_tpv/request.rb and need the signature to be in the options or in another variable, but I can't understand how to do it, the options are filled correctly, but I need the signature too, if I try with variable.signature it says is a private method, can you tell me what is the way? thanks
[15:11:35] FooMunki: has joined #RubyOnRails
[15:11:41] acosonic: has joined #RubyOnRails
[15:11:57] NeoHamled: has joined #RubyOnRails
[15:12:49] arup_r: yeah.. I had a traditional typo.. sorry to mess here
[15:13:10] arup_r: xploshioon: u are an expert man. :D
[15:13:31] n1lo: has joined #RubyOnRails
[15:13:37] arup_r: !botsnack
[15:13:46] arup_r: i have less power..:D
[15:13:59] xploshioon: @arup_r I am a simple man xD
[15:14:22] rasalghul: has joined #RubyOnRails
[15:14:56] apotry: has joined #RubyOnRails
[15:15:11] siaW: i have a nested attribute for accounts and post. accounts has many posts. post belongs to account. but in my browser i’m getting undefined method `posts' for nil:NilClass when i try to create a post for an account. any help? everything is here: https://gist.github.com/siaw23/4adc26a07da78549c799
[15:15:30] maesitos: has joined #RubyOnRails
[15:15:33] siaW: and my repo: https://github.com/siaw23/twitter
[15:15:52] artto: has joined #RubyOnRails
[15:16:54] maesitos: Hello, just a quick question. I come from C++ and I've never been focused on front-en. Javascript and coffescript is driving me nuts. Any idea of where I should strat from?
[15:17:38] ferr: siaw: accepts_nested_attributes_for :posts
[15:18:16] ferr: And then allow parameters in accounts controller for post attributes
[15:19:44] NeoHamled: has left #RubyOnRails: ()
[15:19:45] snowy: has joined #RubyOnRails
[15:19:50] trifling-jest: anyone can help me with turbolinks?
[15:20:05] arup_r: has joined #RubyOnRails
[15:20:23] bbrowning: has joined #RubyOnRails
[15:20:40] kgutteridge: has joined #RubyOnRails
[15:21:31] pawnbox: has joined #RubyOnRails
[15:21:33] korzybski: has joined #RubyOnRails
[15:21:43] daveomcd: has joined #RubyOnRails
[15:22:58] adre: has joined #RubyOnRails
[15:23:01] k13nox: has joined #RubyOnRails
[15:23:17] sash__: has joined #RubyOnRails
[15:23:54] B1n4r10: has joined #RubyOnRails
[15:25:40] Pumukel: has joined #RubyOnRails
[15:26:35] Akuma: has joined #RubyOnRails
[15:28:08] podman: has joined #RubyOnRails
[15:28:31] alexishuard: has joined #RubyOnRails
[15:28:34] siaW: ferr: shouldn’t this be working? https://gist.github.com/siaw23/0e084a8f9d5f9d7200bc
[15:28:51] siaW: ferr: cause it not. i get undefined method `post' for nil:NilClass
[15:29:01] n008f4g_: has joined #RubyOnRails
[15:29:50] Cork: is there any way to get a more descriptive error when a destroy! fails then "ActiveRecord::RecordNotDestroyed: Failed to destroy the record"
[15:29:54] alexishuard: has joined #RubyOnRails
[15:30:47] arup_r: what line of code caused that Cork? show us
[15:30:52] arup_r: first time I am seeing it
[15:31:17] Cork: arup_r: service.server.destroy!
[15:31:29] Cork: Server.find(service.server_id).destroy! works :/
[15:31:35] Cork: confuses the hell out of me
[15:33:10] Scient: service.server.destroy doesnt work?
[15:33:10] arup_r: Cork: cool.. there you go http://api.rubyonrails.org/classes/ActiveRecord/RecordNotDestroyed.html
[15:33:14] Scient: im going to call bs
[15:33:23] arup_r: and that way, you will see what is the message
[15:33:29] arup_r: go and give it a try
[15:33:48] arup_r: Scient: who are those *bs* ?
[15:33:48] lacrymology: has joined #RubyOnRails
[15:34:07] Cork: Scient: no it doesn't
[15:34:25] Cork: all i get when i run it directly is a begin and rollback sql log
[15:34:30] arup_r: Cork: you need to put your destory call exactly like that, and then you will see the message
[15:34:42] arup_r: Cork: please try the one I said. :/
[15:34:46] daveomcd: is there a better, "cleaner" way to write this? https://gist.github.com/daveomcd/cc0ce3e8e17d147477b4
[15:35:26] chouhoulis: has joined #RubyOnRails
[15:36:29] arup_r: daveomcd: can you also show how you are defining `@exposures` ?
[15:36:45] daveomcd: @exposures is nil before that
[15:36:59] shanemcd: has joined #RubyOnRails
[15:36:59] siaW: daveomcd: commented
[15:38:04] Cork: arup_r: sorry got a phone call i had to answer
[15:38:37] arup_r: daveomcd: commented too
[15:38:45] arup_r: but it can be done in SQl
[15:38:53] Cork: arup_r: i'm not sure how you want to me call destroy
[15:39:01] arup_r: if you open to us the associations between the involved models
[15:39:08] joshkovach: has joined #RubyOnRails
[15:39:19] toocwa: has left #RubyOnRails: ()
[15:39:31] Cork: its a belongs_to has_one
[15:39:39] bb2: has joined #RubyOnRails
[15:39:39] dionysus69: has joined #RubyOnRails
[15:39:44] arup_r: Cork: wrap the call as the example I shown in the link.. and then inside the rescue you have the error object, which you can print and see the reason
[15:39:45] Cork: has_one (server) has a dependent: :destroy
[15:40:01] Cork: now i get you
[15:40:10] arup_r: u r always sweet
[15:40:34] daveomcd: arup_r, I've tried your example before but it doesn't add "games" to exposures, but instead addes each college_play_history
[15:40:59] daveomcd: games isn't an association so perhaps thats why... it is a method that calls an active record query
[15:41:39] arup_r: still it should work.. what the output you are getting from my code and what your expectation. it will help
[15:41:57] Cork: arup_r: ah, thx that solved it
[15:41:58] arup_r: daveomcd: I updated
[15:42:07] arup_r: and I had a serious mistake
[15:42:08] Cork: its the dependent: :destroy creating a loop
[15:42:17] daveomcd: arup_r, ahh thanks perfect
[15:42:26] arup_r: Cork: cool... ok may be due to any callbacks or something
[15:42:32] xploshioon: hello guys, how are you? I have a problem, I am using this gem https://github.com/ritxi/sermepa_web_tpv/blob/master/lib/sermepa_web_tpv/request.rb and need the signature to be in the options or in another variable, but I can't understand how to do it, the options are filled correctly, but I need the signature too, if I try with variable.signature it says is a private method, can you tell me what is the way? thanks
[15:42:42] arup_r: hehehe.. xploshioon
[15:42:56] Cork: arup_r: almost, it finds it cause it is called from the object in question
[15:42:58] xploshioon: I am blocked here, sorry :(
[15:43:03] RockLee: has joined #RubyOnRails
[15:43:06] arup_r: lol.. no worries.
[15:44:29] neshmi: has joined #RubyOnRails
[15:44:35] Rodya_: has joined #RubyOnRails
[15:44:53] dkam_: has joined #RubyOnRails
[15:46:01] ElFerna_: has joined #RubyOnRails
[15:48:11] kies^: has joined #RubyOnRails
[15:49:19] tubbo: xploshioon: you are? :)
[15:49:21] tubbo: i can see you
[15:49:27] rdavila: has joined #RubyOnRails
[15:49:50] xploshioon: you are the funny person at parties? :-/
[15:49:57] sanju: has joined #RubyOnRails
[15:50:05] tubbo: xploshioon: oh i thought you meant you were blocked from posting messages in the channel or something
[15:50:40] xploshioon: oh no, with my problem
[15:50:49] delgiudices: has joined #RubyOnRails
[15:52:04] mfaeh: has joined #RubyOnRails
[15:53:27] Guest683: has joined #RubyOnRails
[15:53:57] tubbo: xploshioon: so what's the actual problem you're trying to solve?
[15:54:55] tubbo: xploshioon: i mean, there's no way for you to "merge" the options method with the signature method and keep it entirely within that Request class. there's probably still a way to do what you're doing but it might require thinking of the larger probem a bit differently.
[15:55:00] Devalo: has joined #RubyOnRails
[15:55:07] disgrntld: has joined #RubyOnRails
[15:55:13] msyvich: has joined #RubyOnRails
[15:55:31] artto: has joined #RubyOnRails
[15:58:13] xploshioon: why there is a signature private method?
[15:58:35] xploshioon: in the params method is called, but I really don't understand the way it works
[15:58:40] shanemcd: has joined #RubyOnRails
[15:58:55] daveomcd: web-console doesn't show when I have an exception happen on my development server. Anyone know why this might be? It's update to the latest version
[15:59:41] daveomcd: it used to show at the bottom of my page, but just realized it no longer is
[16:00:01] Timberwo|f: has joined #RubyOnRails
[16:00:12] siaW: i’m getting undefined method `posts' for nil:NilClass, can someone please help me https://gist.github.com/siaw23/0e084a8f9d5f9d7200bc
[16:01:05] tubbo: xploshioon: you can call a private method from within the same instance as it's defined...
[16:01:28] tubbo: xploshioon: it's just that you can't call that method outside of the instance, but if `options` is a public method then yes, the signature will be available within that method
[16:01:38] tubbo: but you can't just call request.signature bare
[16:01:38] bb2: has joined #RubyOnRails
[16:02:16] sash__: has joined #RubyOnRails
[16:02:33] xploshioon: if I run request.options, it gives me all the params I need except the signature, can you tell me why?
[16:02:43] tubbo: siaw: what action does new_for_post.html.erb run for? like it's a template, but what's its action/controller?
[16:02:57] xploshioon: and sorry for my bad english
[16:03:20] tubbo: xploshioon: well i can see that request.signature just instantiates a Signature and calls the signature method on it
[16:03:27] tubbo: xploshioon: so the answer might lie in https://github.com/ritxi/sermepa_web_tpv/blob/master/lib/sermepa_web_tpv/signature.rb
[16:03:49] aegis3121: has joined #RubyOnRails
[16:04:06] siaW: tubbo: action and controller is here https://gist.github.com/siaw23/0e084a8f9d5f9d7200bc#file-posts_controller-rb in “create”
[16:04:33] tubbo: siaw: ah, well you have set_account commented out so it looks like `@account` never gets set to anything.
[16:05:05] mary5030: has joined #RubyOnRails
[16:05:20] stannard: has joined #RubyOnRails
[16:05:25] siaW: tubbo: after uncommenting undefined method `to_model' for #<Post::ActiveRecord_Associations_CollectionProxy:0x007ff3e08f0580>
[16:05:25] siaW: Did you mean? to_xml
[16:05:37] chouhoulis: has joined #RubyOnRails
[16:05:39] siaW: with focus on <%= form_for [@account.posts, @post] do |f| %>
[16:06:05] tubbo: siaw: what?
[16:06:09] xploshioon: I tried with signature = SermepaWebTpv::Signature.new(), but then what? I need to pass parameters? need to run then signature.signature? I tried that and it says is nil and throws error
[16:06:16] xploshioon: sorry, I am new with this
[16:06:36] tubbo: xploshioon: look at how `signature` is defined in Request. see how it passes itself into the argument to Signature?
[16:06:42] tubbo: err, Signature.new()
[16:06:54] siaW: tubbo: i mean. after uncommenting set_account, i get https://gyazo.com/e19b2df43362cfb60250998030c75dde
[16:07:13] smathy: has joined #RubyOnRails
[16:07:34] tubbo: xploshioon: also, you can call private methods if you do request.send(:signature)
[16:07:59] tubbo: siaw: ah right, yeah because you can't pass a collection into there.
[16:08:16] siaW: tubbo: how do i fix it then? :)
[16:08:21] sp1rs: has joined #RubyOnRails
[16:08:45] shanemcd: has joined #RubyOnRails
[16:11:02] sandstrom: has joined #RubyOnRails
[16:11:29] tubbo: siaw: well, what Rails is really doing there is using AR's `to_model` to determine what the route should be in the form_for. so if you pass a CollectionProxy into it that won't work because to_model isn't defined. don't worry about that too much for now, all you have to worry about is always passing a single AR model into each of those array poisitons.
[16:11:44] tubbo: siaw: so, in this case if you wanted this to POST to "/accounts/1/posts", you'd want to do [@account, @post]
[16:12:08] tubbo: this also extends to namespaces, like if this route was "/admin/accounts/1/posts", you'd want to do [:admin, @account, @post]
[16:12:28] tubbo: (shrug) this API is really weird but once you get the hang of it, it makes really beautiful code.
[16:13:30] siaW: tubbo: well i fixed that but now getting this https://gyazo.com/7d61ef86eb324985d4be7b4900a7efa7
[16:14:14] siaW: can’t i use build? since i’m using a nested attribute?
[16:14:42] xploshioon: @tubbo this is my controller https://gist.github.com/xploshioOn/440f15709f0b714ce82a, what I need to add to create the signature?
[16:14:52] tubbo: siaw: no, that syntax is just completely wrong because Account.posts isn't a method. the "Account" class doesn't have posts, but an instance of an account would have posts. make sense?
[16:15:12] tubbo: xploshioon: nothing, it should be created for you in the options
[16:15:23] siaW: meaning this is ok
[16:15:24] siaW: @post = @ccount.posts.build(post_params)
[16:15:29] disgrntld: has left #RubyOnRails: ()
[16:15:33] tubbo: xploshioon: if that's not happening you either have an error in your configuration, or the gem has a bug in it.
[16:15:40] tubbo: siaw: should be, yeah
[16:15:58] xploshioon: well, let me verify the config
[16:16:15] yellow5: has joined #RubyOnRails
[16:16:44] tubbo: xploshioon: i've never used this gem before so i'm not gonna be much help, but i can at least tell you that your code looks ok :)
[16:17:53] siaW: tubbo: that works fine :)
[16:18:16] siaW: tubbo: thanks :)
[16:20:40] yellow5: has joined #RubyOnRails
[16:21:02] speakingcode: has joined #RubyOnRails
[16:21:10] flashpoint9: I have a somewhat complex issue. I have 2 models Credit and Debit both will create or update an object of a third model Total. The Credit and Debit objects are updating info on the home page via ajax. My callback on credit and debit happens after commit and the ajax will update the values but the total value isn't correct because the calculation happens after commit, so the values on thepage are updated, then the total is calculat
[16:21:44] xploshioon: @tubbo well, fuck the gem, I make my private method that create the signature and @options["DS_Merchant_MerchantSignature"] = signature(@options)
[16:22:04] xploshioon: aaaand it works
[16:22:26] flashpoint9: i dont have a contrller for Total because only on credit and debit creation is that table manipulated, will i have to create a controller in order to leverage another callback for Total to update the value via ajax AFTER the total is created?
[16:22:40] xploshioon: hahaha created and issue in the gem to know what's the problem but now is working, thanks for your help @tubbo
[16:23:09] tjohnson: has joined #RubyOnRails
[16:24:56] polishdub: has joined #RubyOnRails
[16:25:13] jfelchner: has joined #RubyOnRails
[16:26:57] astrofog: has joined #RubyOnRails
[16:28:45] AzaToth: has joined #RubyOnRails
[16:30:17] lyoshajapan: has joined #RubyOnRails
[16:30:55] DmitryBochkarev: has joined #RubyOnRails
[16:31:39] emachnic: has joined #RubyOnRails
[16:31:57] delgiudices: has joined #RubyOnRails
[16:32:59] codesoda: has joined #RubyOnRails
[16:36:31] godzillaenlacasa: has joined #RubyOnRails
[16:36:54] greengriminal: has joined #RubyOnRails
[16:37:03] greengriminal: is there a more elegant way of doing: 'CamelCase'.underscore.split('_').join(' ').split().map(&:capitalize).join(' ')
[16:38:02] SteenJobs: has joined #RubyOnRails
[16:38:45] adaedra: you mean, break at each capital?
[16:39:06] ryanRT: has joined #RubyOnRails
[16:39:36] pbrocker: has joined #RubyOnRails
[16:40:56] pawnbox: has joined #RubyOnRails
[16:41:08] greengriminal: adaedra, - sorry this was the example: 'password_criteria'.underscore.split('_').join(' ').split().map(&:capitalize).join(' ')
[16:41:34] greengriminal: so when encountered with an underscore remove it and capitalize the starting word..
[16:41:37] _Ducky-: has joined #RubyOnRails
[16:41:47] acosonic: has joined #RubyOnRails
[16:42:07] delgiudices: has joined #RubyOnRails
[16:42:22] msyvich: has joined #RubyOnRails
[16:42:25] kgutteridge: has joined #RubyOnRails
[16:43:25] defsdoor: has joined #RubyOnRails
[16:44:27] cschneid_: has joined #RubyOnRails
[16:44:41] mephistophocles: has joined #RubyOnRails
[16:44:54] fryguy: greengriminal: #camelize is in active-support
[16:44:58] fryguy: [1] pry(main)> 'under_score_case'.camelize
[16:44:59] fryguy: => "UnderScoreCase"
[16:45:30] greengriminal: yes i get that but what i wanted was "under_score_case" => Under Score Case
[16:45:41] dkam_: has joined #RubyOnRails
[16:45:48] greengriminal: i just wanted to know if there was a cleaner way but its okay
[16:45:56] adaedra: 'CamelCase'.gsub(/\s?[A-Z]|(_|\A)[a-z]/) { |l| ' ' + l.upcase[-1] }.lstrip
[16:46:05] adaedra: not sure how better it is :p
[16:46:34] fryguy: doesn't work with ut8 so
[16:46:47] ayoros: has joined #RubyOnRails
[16:46:56] laith: has joined #RubyOnRails
[16:47:36] hamed_r: has joined #RubyOnRails
[16:47:41] tubbo: greengriminal: it's called `.underscore`
[16:47:48] tubbo: oh you're using it :)
[16:47:56] slash_nick: greengriminal: you want foo_bar to Foo Bar? that's #titleize
[16:48:00] tubbo: or humanize
[16:48:07] tubbo: but yeah, titleize is the shit :)
[16:48:14] adaedra: ah, forgot about this one :p
[16:48:28] slash_nick: adaedra: your regexp is good too :P
[16:48:38] greengriminal: forgot about that one too.
[16:49:47] fryguy: neither do quite what he wants
[16:49:52] fryguy: since he wants all words capitalized
[16:50:01] slash_nick: fryguy: no, titleize does quite what he wants :)
[16:50:05] fryguy: .humanize.titleize
[16:50:10] fryguy: does what he wants I think
[16:50:22] greengriminal: yeah titleize was what i wanted
[16:50:25] greengriminal: just forgot about it.
[16:50:34] slash_nick: fryguy: that should return the same thing as #titleize alone
[16:50:48] beingjohnm: has joined #RubyOnRails
[16:51:23] FooMunki: has joined #RubyOnRails
[16:51:23] beingjohnm: has joined #RubyOnRails
[16:51:27] greengriminal: [19] pry(main)> 'password_criteria'.underscore.titleize
[16:51:28] greengriminal: => "Password Criteria"
[16:51:30] fryguy: [1] pry(main)> "under_score_case".titleize
[16:51:30] fryguy: => "Under_score_case"
[16:51:30] fryguy: [2] pry(main)> "under_score_case".humanize.titleize
[16:51:30] fryguy: => "Under Score Case"
[16:51:42] augcesar[2]: has joined #RubyOnRails
[16:52:00] augcesar[2]: has left #RubyOnRails: ()
[16:52:44] slash_nick: fryguy: that's odd... i wonder what version of rails you're running that on
[16:52:56] fernandomm: has joined #RubyOnRails
[16:52:57] kgutteridge: has joined #RubyOnRails
[16:53:08] fryguy: slash_nick: 4.2.5.1
[16:53:24] slash_nick: fryguy: yuno rails 5?
[16:53:29] enitiz: has joined #RubyOnRails
[16:53:42] slash_nick: 2.3.0 :001 > "under_score_case".titleize => "Under Score Case"
[16:53:47] fryguy: haven't upgraded the app yet, also beta etc
[16:53:56] cabargas: has joined #RubyOnRails
[16:54:21] greengriminal: I'm using rails 3.2.x were currently upgrading to Rails 4.
[16:54:53] slash_nick: greengriminal: what's fryguy's string return for you?
[16:55:02] greengriminal: let me try it out
[16:55:03] adaedra: slash_nick: rails 5 is not out yet, is it?
[16:55:23] greengriminal: [20] pry(main)> "under_score_case".humanize.titleize
[16:55:23] greengriminal: => "Under Score Case"
[16:55:26] emachnic: has joined #RubyOnRails
[16:55:27] slash_nick: adaedra: beta3 is... last i checked there were only a small handful of bugs tagged with the rails 5 milestone...
[16:55:45] slash_nick: greengriminal: and just #titleize.. what's that give you?
[16:55:52] tubbo: slash_nick: _rails_ works, the gems surrounding it? not so much.
[16:55:58] tubbo: you can't "just" upgrade right now imho
[16:56:24] greengriminal: [21] pry(main)> "under_score_case".titleize
[16:56:24] greengriminal: => "Under Score Case"
[16:56:26] slash_nick: tubbo: fair enough... i chose to use it for a greenfield api project... nothing to upgrade. also, kept my dependencies to a minimum
[16:56:27] greengriminal: that works too.
[16:56:35] codelahoma: has joined #RubyOnRails
[16:56:42] slash_nick: greengriminal: that's awesome... i guess there's a defect with rails 4.2.5.1
[16:56:49] tubbo: slash_nick: guess you're not using redis to cache? ;)
[16:57:00] slash_nick: tubbo: no cache just yet
[16:57:29] slash_nick: tubbo: but i will use it when it's ready :D
[16:58:23] slash_nick: no users, no sessions... just a middleware verifying a token and adding metadata to the request.env object... then routing constraints to control what routes exist based on that metadata
[16:58:26] tubbo: yeah our big blocker right now is mongoid IIRC
[16:58:54] bronson: has joined #RubyOnRails
[16:59:24] slash_nick: it's pretty slick, as using routing constraints allows you to require parameters before they even reach a controller... 400 if required params are missing at the route level
[16:59:29] pixelhandler: has joined #RubyOnRails
[17:01:25] flashpoint9: I have a create.js.erb that is run after an object is created, I would like to have some js run AFTER the object is saved, can't find antyhing in google, does anyone knwo how to do that?
[17:01:54] tubbo: flashpoint9: you mean updated or just any time it's saved?
[17:02:23] slash_nick: flashpoint9: well, persistence is the servers job... so you'd want to run your JS after your browser receives the "200" or "201" response from the server
[17:03:06] greengriminal: when using ruby there's always more than one way to skin a cat ;)
[17:05:24] flashpoint9: tubbo: I have a callback thats updating the value of another model, the create.js.erb is grabbing the value of the other model before the callback, so object is created -> grabs value 1200 -> callback runs and updates values to 1201
[17:05:26] Oliphaunte: has joined #RubyOnRails
[17:06:13] tubbo: flashpoint9: like an active_record callback or a JS callback of some kind?
[17:06:28] tubbo: because if it's AR it's most likely being called _before_ your JS ever runs
[17:06:38] flashpoint9: tubbo: thats my model http://paste.ofcode.org/35kkH8ETFFEPYvZSiyUEqdw
[17:07:15] flashpoint9: theres an active record callback to manipulate data on the Total object
[17:07:16] tubbo: flashpoint9: yeah so that before_save gets called before create.js.erb
[17:07:20] tubbo: just so you're aware
[17:07:53] flashpoint9: well then it should work correct?
[17:07:56] allcentury: has joined #RubyOnRails
[17:08:04] flashpoint9: if i refresh the page it works, just not the ajax
[17:08:13] xhoy_: is there a way to see in the controller what the source object was? (i do a get to /relations/:id/template/:template_type, i now have a relation_id (but it could be a random_id) params can i easly detect what type it was except with a case or something?
[17:09:16] flashpoint9: tubbo: thats the output in the console http://paste.ofcode.org/PqsmBaWq9KqgMFT2kGSz2f
[17:09:41] tvw: has joined #RubyOnRails
[17:10:05] tubbo: flashpoint9: i don't know what your definition of "works" is, but the method is definitely being called there. so yeah, it should work.
[17:10:15] Surt_Q: has joined #RubyOnRails
[17:10:24] tubbo: flashpoint9: my advice would be to refactor what you have in create.js.erb that needs to be run on update as well into a function that you can just call on both JS views
[17:10:46] tubbo: and put that function in app/assets/javascripts/credits.js
[17:11:21] flashpoint9: tubbo: hmmm, my create.js is http://paste.ofcode.org/cZTe6Erf2YaNMqbFmSy4Mv, you think that needs to be moved elsewhere?
[17:11:37] tubbo: flashpoint9: isn't that what you wanted??
[17:11:42] tubbo: flashpoint9 | I have a create.js.erb that is run after an object is created, I would like to have some js run AFTER the object is saved, can't find antyhing in google, does anyone knwo how to do that?
[17:11:45] flappynerd: has joined #RubyOnRails
[17:11:59] flashpoint9: yea i thought it would work too
[17:12:08] flashpoint9: hmm, ill take your advice and review my files
[17:12:25] flashpoint9: tubbo: thanks so much for checking that out with me
[17:12:35] flappynerd: if I have a join model, like: salesmen_accounts and I wanna update a column such as :comission decimal
[17:12:39] flappynerd: what should I use for that?
[17:12:48] flappynerd: can I do that with a nested form helper?
[17:12:58] flappynerd: also I wanna be able to do that from a list, so "in bulk"
[17:13:26] msyvich: has joined #RubyOnRails
[17:13:41] msyvich: I have passwordless sudo setup on my server for service restarts.
[17:14:01] msyvich: How can I prevent capistrano from asking me for a password for sudo service restart * ?
[17:14:02] jottr: has joined #RubyOnRails
[17:14:11] shanemcd: has joined #RubyOnRails
[17:14:23] msyvich: The password isn't necessary for this command, so I want capistrano to not ask for the password, for this particular command.
[17:14:53] Takumo: has joined #RubyOnRails
[17:15:28] Takumo: Hi all, I'm deploying an app via capistrano, but I get the error "database connector does not specify an adaptor", I'm loading the DB info from a URI in an environment variable
[17:15:44] Takumo: if I manually run RAILS_ENV=staging bundle exec rackup the app runs no problem
[17:16:54] tubbo: Takumo: isn't there a way to set RAILS_ENV=staging with Capistrano whenever it runs an SSH command?
[17:17:29] tubbo: Takumo: i just have `set :rails_env, :production` in my config/deploy/production.rb
[17:17:50] Takumo: tubbo: the command its failing at is “export RAILS_ENV="staging" ; ~/.rvm/bin/rvm default do bundle exec rake assets:precompile”
[17:18:01] arup_r: has joined #RubyOnRails
[17:18:36] tubbo: don't try to export the env var yourself, let capistrano do it for you. i'm assuming this is Capistrano v3 also.
[17:18:50] Takumo: yes its capistrano v3
[17:18:55] Takumo: and yes capistrano is exporting it
[17:19:12] tubbo: Takumo: perhaps your RVM installation is messed up somehow?
[17:19:22] Takumo: let me check
[17:20:59] rakm: has joined #RubyOnRails
[17:21:38] delgiudices: has joined #RubyOnRails
[17:22:14] KensoDev: has joined #RubyOnRails
[17:24:00] siaW: i have a :posts resource nested in :accounts resource. how do i create a link to create a NEW post. this is what i’m trying <%= link_to "Create tweet", new_account_post_path(@account.post) %>
[17:24:06] siaW: tweet = post
[17:25:48] rakm: has joined #RubyOnRails
[17:27:34] benlieb: has joined #RubyOnRails
[17:27:53] nogic: has joined #RubyOnRails
[17:28:13] Pazician: has joined #RubyOnRails
[17:28:48] nogic: has joined #RubyOnRails
[17:29:33] Takumo: tubbo: silly me, $HOME/.zshrc isn't going to run when cap does its thing
[17:29:38] Takumo: because its not using a shell
[17:29:50] nogic: has joined #RubyOnRails
[17:30:38] bronson: has joined #RubyOnRails
[17:32:06] tubbo: Takumo: it is, just not that one :)
[17:32:09] Jasaka: has joined #RubyOnRails
[17:32:17] tubbo: Takumo: iirc cap uses the basic bourne shell (`sh`)
[17:33:07] Takumo: hmm, now to get a rack server starting correctly
[17:33:18] pipework: Takumo: Shouldn't be hard, it's often really fun!
[17:33:33] Takumo: probably will use upstart job
[17:33:35] Takumo: hometime!
[17:34:11] dopie: has joined #RubyOnRails
[17:35:13] Maletor: has joined #RubyOnRails
[17:35:45] FooMunki: has joined #RubyOnRails
[17:35:57] sash__: has joined #RubyOnRails
[17:36:10] pipework: Takumo: What rack handler are you thinking of using?
[17:36:33] Jasaka: has joined #RubyOnRails
[17:37:06] chouhoulis: has joined #RubyOnRails
[17:37:56] solars: has joined #RubyOnRails
[17:38:51] Pazician: has joined #RubyOnRails
[17:40:47] jeanlinux: has joined #RubyOnRails
[17:41:20] goodcodeguy: has joined #RubyOnRails
[17:42:10] ayoros: has joined #RubyOnRails
[17:43:13] Jasaka: Hi, I have a problem after using Git on my RoR Application I get an "../projekt/gemfile not found" after trying to rake db:migrate. There is a 'Gemfile' in said directory. Formerly working commits arent working either, throwing the same line. Does anyone have any idea what would cause this? You'd save my life.
[17:43:23] snowy: has joined #RubyOnRails
[17:46:37] cnk: has joined #RubyOnRails
[17:47:35] dionysus69: has joined #RubyOnRails
[17:51:50] chouhoulis: has joined #RubyOnRails
[17:52:50] rubyonrailed: has joined #RubyOnRails
[17:54:02] josephkokenge: has joined #RubyOnRails
[17:54:43] solars_: has joined #RubyOnRails
[17:55:02] msyvich: has joined #RubyOnRails
[17:55:02] pydave6377: has joined #RubyOnRails
[17:56:50] techsethi: has joined #RubyOnRails
[17:57:16] lacrymology: has joined #RubyOnRails
[17:58:09] Disavowed: has joined #RubyOnRails
[17:58:25] techsethi_: has joined #RubyOnRails
[17:58:51] Disavowed: has joined #RubyOnRails
[17:59:21] alexishuard: has joined #RubyOnRails
[18:01:47] chouhoulis: has joined #RubyOnRails
[18:03:05] sleungcy: has joined #RubyOnRails
[18:03:23] Jasaka: Oh, and gem update doesn't do anything
[18:03:52] mikecmpbll: has joined #RubyOnRails
[18:04:50] smoitra: has joined #RubyOnRails
[18:05:40] sandstrom: has joined #RubyOnRails
[18:05:48] dionysus69: has joined #RubyOnRails
[18:06:23] istrasci: has joined #RubyOnRails
[18:06:53] smathy: Sounds like maybe you've configured BUNDLE_GEMFILE incorrectly with "gemfile" instead of "Gemfile"
[18:06:57] pinkerton: has left #RubyOnRails: ()
[18:07:00] nogic: has joined #RubyOnRails
[18:07:42] aarkerio: has joined #RubyOnRails
[18:09:26] nzst: has joined #RubyOnRails
[18:09:34] flashpoint9: has joined #RubyOnRails
[18:11:17] groatyoats: has joined #RubyOnRails
[18:11:58] shanemcd: has joined #RubyOnRails
[18:12:35] defsdoor: has joined #RubyOnRails
[18:13:31] techsethi: has joined #RubyOnRails
[18:14:01] istrasci: I'm doing a Model.select to only send certain, non-sensitive properties to Javascript. However, I need to do an .includes() to get an associated relation, but apparently includes() cannot be used with select(). What's the best way around this?
[18:14:30] shanemcd: has joined #RubyOnRails
[18:14:41] Jasaka: Thanks smathy, how can I reconfigure configure BUNDLE_GEMFILE?
[18:15:12] smathy: Jasaka, first thing is to take a look in the .bundle/config file - see if that's saved the configuration or something.
[18:16:15] maesitos: has joined #RubyOnRails
[18:16:44] nogic: has joined #RubyOnRails
[18:17:21] intrigueD: has joined #RubyOnRails
[18:17:34] baweaver: has joined #RubyOnRails
[18:17:44] ElFerna_: has joined #RubyOnRails
[18:17:54] nogic: has joined #RubyOnRails
[18:19:24] dionysus69: has joined #RubyOnRails
[18:20:46] Jasaka: smathy, where would .bundle be located? could an absence of it be the issue?
[18:20:59] cnk: istrasci: Do the query without the select and then use as_json or active model serializer to output only the fields you want in your JSON
[18:21:30] istrasci: cnk: Cool, I'll try that. Thanks.
[18:21:59] puff: has joined #RubyOnRails
[18:22:54] sbarg: has joined #RubyOnRails
[18:23:06] dkam_: has joined #RubyOnRails
[18:26:25] maesitos: has joined #RubyOnRails
[18:26:56] sbarg: has left #RubyOnRails: ()
[18:28:37] patrick99e99: has joined #RubyOnRails
[18:29:15] baweaver: has joined #RubyOnRails
[18:29:34] Jon30: did anybody have a problem where Apache/Passenger would truncate the html content at the end of the document? gzip enabled, Latest version of apache and Passenger, and ruby 1.9.3. I am assuming content-size value in the header is incorrect? I asked on #apache but they sent me to #passenger, and #passenger is dead, so I just wanted to quickly ask here.
[18:29:48] patrick99e99: hey everyone... question.. so lets say I have a controller that calls a service, and that service does something like ActiveRecord::Base.transcation { expensive_thing; expensive_thing2; ... }... And so it's in the middle of that, and then the caller hitting the controller times out and gets a 504... What happens to that transaction? is it killed somehow?
[18:30:03] maesitos: has joined #RubyOnRails
[18:30:25] tubbo: Jon30: yeah i'd imagine the Content-Length header is wrong, but i've certainly never had that happen
[18:30:29] tubbo: Jon30: what version of rails?
[18:30:57] Jon30: tubbo: 3.2.13
[18:30:58] dionysus69: has joined #RubyOnRails
[18:31:09] tubbo: patrick99e99: pretty sure, yeah. what happens when you Ctrl+C out of the database console in the middle of a transaction? :)
[18:31:13] tubbo: until you COMMIT, it doesn't do anything
[18:31:22] tubbo: but that's not 100%
[18:31:53] jcm: has joined #RubyOnRails
[18:32:02] [Butch]: has joined #RubyOnRails
[18:32:14] maesitos_: has joined #RubyOnRails
[18:32:16] techsethi_: has joined #RubyOnRails
[18:32:34] patrick99e99: tubbo: well.. im confused because I am finding that the records are getting created but a 504 happened.... trying to understand how thats even possible
[18:33:04] Jon30: tubbo: it only does it on couple of sites -- which are both ruby 1.9.3 and rails 3. upgrading rails for these apps is currently not an option. I wonder if changing to ruby 2.0 would make a difference...
[18:33:04] sbarg1: has joined #RubyOnRails
[18:33:21] tubbo: patrick99e99: "Gateway Timeout" typically means the app server crashed, and basically cut off its connection to the web server, iirc
[18:33:26] ace05: has joined #RubyOnRails
[18:33:56] tubbo: Jon30: i'd be more inclined to think it was rails than ruby, but who knows. upgrading to 2.0 can't hurt, it's not like the 1.8->1.9 upgrade
[18:33:58] nogic: has joined #RubyOnRails
[18:34:07] tubbo: Jon30: frankly you are risking your users' security if you're still running 1.9 since it's EOLed
[18:34:13] manfrin: has joined #RubyOnRails
[18:34:26] maesitos: has joined #RubyOnRails
[18:34:31] mices: has joined #RubyOnRails
[18:34:31] sbarg1: has left #RubyOnRails: ()
[18:35:50] stannard: has joined #RubyOnRails
[18:35:56] sandstrom: has joined #RubyOnRails
[18:36:22] Axy: has joined #RubyOnRails
[18:36:22] Axy: has joined #RubyOnRails
[18:37:30] maesitos: has joined #RubyOnRails
[18:38:12] Jon30: tubbo: gotcha! I will attempt to upgrade to ruby 2.0, and if that doesn't work, I will try to upgrade rails to the latest 3.2.x version
[18:38:41] kgutteridge: has joined #RubyOnRails
[18:39:02] bronson: has joined #RubyOnRails
[18:39:04] tubbo: Jon30: oh yeah, i forgot about that...first pre-requisite is updating to the latest rails version because there's absolutely no reason you shouldn't be on the latest patch level of rails 3.2
[18:39:14] tubbo: Jon30: patch level upgrades shouldn't break your app at all.
[18:39:27] Jon30: I'll do both then. :) Thanks
[18:42:04] defsdoor: has joined #RubyOnRails
[18:44:11] djbkd: has joined #RubyOnRails
[18:44:13] baweaver: has joined #RubyOnRails
[18:44:14] nogic: has joined #RubyOnRails
[18:45:04] nogic: has joined #RubyOnRails
[18:45:33] lyoshajapan: has joined #RubyOnRails
[18:46:04] nogic: has joined #RubyOnRails
[18:46:41] kgutteridge: has joined #RubyOnRails
[18:46:57] banister: has joined #RubyOnRails
[18:47:19] nogic: has joined #RubyOnRails
[18:47:45] qejk: has joined #RubyOnRails
[18:48:17] ace05: looking to ask a question in jquery for an erb view in rails
[18:48:44] nogic: has joined #RubyOnRails
[18:48:46] dopamean_: has joined #RubyOnRails
[18:49:09] Sigma00: in case anyone is interested, my company is sponsoring a Women Who Code event at our HQ next week (Rails Hack Club) http://www.meetup.com/Women-Who-Code-Silicon-Valley/events/229218067/
[18:49:21] techsethi: has joined #RubyOnRails
[18:49:37] nogic: has joined #RubyOnRails
[18:49:39] sneakerhax: has joined #RubyOnRails
[18:50:04] Guest13: has joined #RubyOnRails
[18:50:37] nogic: has joined #RubyOnRails
[18:52:14] Pazician: has joined #RubyOnRails
[18:53:08] captkepler: has joined #RubyOnRails
[18:54:04] dionysus69: has joined #RubyOnRails
[18:54:06] techsethi: has joined #RubyOnRails
[18:58:24] arthurl: has joined #RubyOnRails
[18:58:59] jeanlinux: has joined #RubyOnRails
[18:59:59] diegoviola: has joined #RubyOnRails
[19:00:39] blackmes1: has joined #RubyOnRails
[19:00:42] dionysus69: has joined #RubyOnRails
[19:01:31] tubbo: ace05: !ask
[19:01:31] helpa: ace05: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
[19:02:12] tubbo: Sigma00: boo railstutorial ;)
[19:02:31] djbkd: has joined #RubyOnRails
[19:03:04] djbkd: has joined #RubyOnRails
[19:03:27] tubbo: ace05: hi
[19:03:31] uglybandersnatch: has joined #RubyOnRails
[19:04:37] ace05: i'm trying to get a toggle feature working in my rails view and am wondering how you would wrap the jquery around the looped tables in my view
[19:04:41] flashpoint9: has joined #RubyOnRails
[19:06:00] ekinmur: has joined #RubyOnRails
[19:06:11] Sigma00: tubbo: we don't control what they do in the event, we're just sponsoring and giving them a location
[19:06:42] tubbo: Sigma00: i know i was just trolling ya...actually railstutorial is really good for beginners IMHO as a "tour" of rails' features
[19:06:51] Ergo: has joined #RubyOnRails
[19:06:58] aegis3121: has joined #RubyOnRails
[19:07:19] tubbo: ace05: you might need to gist the code you're working with
[19:07:34] tubbo: ace05: did you read the link about how to ask good questions?
[19:07:37] ace05: hi tubbo just doing that now
[19:08:49] alexishuard: has joined #RubyOnRails
[19:09:35] ace05: tubbo trying to do this http://jsfiddle.net/bruno/MBzE6/5/
[19:10:17] tubbo: ace05: ok, so why can
[19:10:35] tubbo: ace05: so why can't you throw that JS in one of your JS files?
[19:10:38] ace05: in this (in the loop between line 30 and 42) https://gist.github.com/trekr5/03adbdff11389c5dd7a3
[19:10:57] ace05: tubbo i did that
[19:10:59] drbayer: has joined #RubyOnRails
[19:11:08] ace05: it isn't toggling though
[19:11:10] tubbo: bgcolor="99cc00"? what is this 1999? ;)
[19:11:18] ace05: very funny
[19:11:43] tubbo: ace05: your code here doesn't include the class names that were in that gist, so if you copy/pasted the JS over it wouldn't be able to select any of the elements
[19:11:50] istrasci: has left #RubyOnRails: ()
[19:11:54] tubbo: ace05: sorry, not the gist, the jsfiddle.
[19:12:23] tubbo: ace05: it also seems like you have a <tr> nested within another <tr>, which IIRC you can't do
[19:12:26] workmad3: ace05: wtf is with your table nesting there... you open a <tr> before your loop, and have the <tbody> tags around the <table>...
[19:12:38] cnr_roxx: has joined #RubyOnRails
[19:12:48] tubbo: yeah that too
[19:12:53] tubbo: that markup is gonna look weird
[19:13:41] workmad3: most likely chrome will remove the <tbody> tags, and the first <tr> will be auto-closed (close-tag omission is allowed if it's followed by another <tr>)
[19:13:56] workmad3: but still... screwy markup
[19:14:02] DoctorMonocular: has joined #RubyOnRails
[19:14:33] differentreality: has joined #RubyOnRails
[19:14:43] _bogus_: has joined #RubyOnRails
[19:14:43] _bogus_: has joined #RubyOnRails
[19:18:14] kdough: has joined #RubyOnRails
[19:19:03] nogic: has joined #RubyOnRails
[19:23:20] worstcase: has joined #RubyOnRails
[19:24:13] worstcase: is there any common way if i want to have a "Parent Model" that is able to do stuff count/order over all its children?
[19:24:52] weaksauce: has joined #RubyOnRails
[19:25:25] KensoDev: has joined #RubyOnRails
[19:25:30] adaedra: That's a one-to-many relation
[19:25:39] adaedra: With `belongs_to` and `has_many`
[19:26:50] chouhoulis: has joined #RubyOnRails
[19:27:06] arthurix: has joined #RubyOnRails
[19:27:28] Intii: has joined #RubyOnRails
[19:27:35] arthurix_: has joined #RubyOnRails
[19:27:39] jottr: Hi all. Is there a way to generate a development.rb automatically in rails 4?
[19:28:09] Intii: Hi everyone, I'm trying to the use the Pundit gem in my rails-api project but I keep getting this error:uninitialized constant ApplicationController::Pundit
[19:28:24] Intii: Not sure why it's throwing that error
[19:28:51] tubbo: jottr: it should generate one for you automatically with `rails new`.
[19:29:23] jottr: tubbo: It's an old project, which for some reason does not have the development.rb. That's why I'm asking.
[19:29:37] tbuehlmann: Intii: is pundit in your Gemfile? did you bundle install?
[19:29:53] siaW: i have :posts nested in :accounts. is my way of setting the @account variable in the Post controller right? https://gist.github.com/siaw23/244fbf20625c3fecb22c#file-posts_controller-rb-L48 because i get this error: Couldn't find Account with 'id'=#<Post::ActiveRecord_Associations_CollectionProxy:0x007fe7ba059c50>
[19:30:05] Radar: GOOD MORNING
[19:30:18] Intii: tbuehlmann: Yep. It's in the Gemfile and I've bundle installed already
[19:30:28] Intii: Good morning Radar!
[19:30:49] DoctorMonocular: has joined #RubyOnRails
[19:31:12] tbuehlmann: Intii: I assume ::Pundit raises the same?
[19:31:26] tubbo: siaw: what are you setting params[:account_id] to?
[19:32:05] siaW: tubbo: i’m assuming Rails will magically know which id i want
[19:32:15] Cohedrin: has joined #RubyOnRails
[19:32:16] Intii: tbuehlmann: Yep... uninitialized constant Pundit
[19:32:35] tbuehlmann: weird. have you restarted stuff?
[19:33:02] Intii: I've restarted everything but the actual computer it self
[19:33:20] rdavila: has joined #RubyOnRails
[19:33:27] smathy: jottr, create a new Rails 4 project, copy the development.rb from there.
[19:33:42] jottr: smathy: doing that right now...
[19:33:49] tbuehlmann: no idea then, sorry
[19:33:53] snowy: has joined #RubyOnRails
[19:33:59] johnflux: has joined #RubyOnRails
[19:34:01] Intii: No worries! Appreciate your help
[19:34:08] tubbo: siaw: i mean, that param is set in the request, so if you have a route like /accounts/:account_id/posts/:id, and you set account_id: 1, it will do Account.find 1
[19:35:02] kgutteridge: has joined #RubyOnRails
[19:35:08] Pumukel: has joined #RubyOnRails
[19:35:08] siaW: tubbo: so how do i set :account_id?
[19:36:09] laith: has joined #RubyOnRails
[19:37:54] sandstrom: has joined #RubyOnRails
[19:40:07] laith: has joined #RubyOnRails
[19:42:01] siaW: tubbo: is this enough? params.require(:post).permit(:tweet, accounts_attributes: [:account_id])
[19:42:22] siaW: here i added accounts_attributes to the strong parameters method
[19:43:17] chouhoulis: has joined #RubyOnRails
[19:43:28] jeanlinux: has joined #RubyOnRails
[19:48:06] baweaver: has joined #RubyOnRails
[19:48:47] Radar: siaw: Stacktrace for error please.
[19:49:10] Radar: siaw: From what I can tell, your code is correct but your error says otherwise. I want to know the stacktrace.
[19:49:11] dalbusch1t: has left #RubyOnRails: ()
[19:50:13] JakFrist: has joined #RubyOnRails
[19:51:06] cnr_roxx: has joined #RubyOnRails
[19:51:12] siaW: Radar: is this what you want to see? https://gyazo.com/1b7bf8cc3f5fdc43f4beb3594b83c297
[19:51:48] Radar: siaw: Can you please include the top of that page too?
[19:51:57] Radar: siaw: I want to see both the error + stacktrace together
[19:52:26] arthurl: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[19:52:40] siaW: Radar: https://gyazo.com/8da7f5a8e6aae2523fb60126d28881e8 :)
[19:53:13] Radar: siaw: Are you manipulating params[:account_id] anywhere before that controller? i.e. in a before_action in ApplicationController?
[19:53:19] Radar: siaw: Can you reproduce this issue in a new application?
[19:53:30] fox_mulder_cp: somebody start ansible from RoR apps?
[19:53:39] siaW: no i’m not manipulating it anywhere
[19:54:02] fox_mulder_cp: intresting how to parse it output
[19:54:06] siaW: Radar: repo: https://github.com/siaw23/twitter
[19:54:45] Radar: fox_mulder_cp: I would not advise to do so.
[19:54:56] Intii: has joined #RubyOnRails
[19:55:20] Radar: fox_mulder_cp: The output isn't in a standardised format and so parsing it would be hard.
[19:55:21] smathy: siaw, this is being triggered in your `new` action, you won't have any params there.
[19:55:32] Intii: Would anyone know why Rails still responds to requests when rails server is not running?
[19:55:37] Radar: smathy: what
[19:55:47] netzfisch: has joined #RubyOnRails
[19:55:50] Radar: Intii: what's your proof of that?
[19:55:50] fox_mulder_cp: Intii: cache from nginx?
[19:55:57] yellow5: has joined #RubyOnRails
[19:56:01] Intii: fox_mulder_cp: No nginx on dev computer
[19:56:01] smathy: Radar, he updated https://gyazo.com/8da7f5a8e6aae2523fb60126d28881e8
[19:56:14] smathy: Radar, "in PostsController#new"
[19:56:17] Intii: Radar: Postman still responds to my requests even though rails s is not running in my Terminal
[19:56:18] fox_mulder_cp: Intii: so, dropped child?
[19:56:24] Radar: smathy: look at the URL. That's the real problem
[19:56:26] smathy: Radar, and look at the before action, no restriction on which actions it's being run for.
[19:56:31] Radar: siaw: Why is your URL like that?
[19:56:38] Radar: smathy: It'll be fine if it's a nested route.
[19:56:39] Intii: fox_mulder_cp: What do you mean?
[19:56:46] smathy: Radar, ah, ha! :)
[19:57:02] siaW: Radar: like twitter.dev part? or what follows
[19:57:08] Radar: siaw: ... what follows
[19:57:11] djbkd: has joined #RubyOnRails
[19:57:16] siaW: Radar: i have NO IDEA
[19:57:18] Radar: siaw: Your ID for your route is what's wrong.
[19:57:20] siaW: why it’s like that
[19:57:22] Radar: siaw: How did you get that route?
[19:57:35] Radar: siaw: Can you go to the root of your app and then somehow get that path again?
[19:58:16] Radar: siaw: please tell me how you get that path because I can't figure it out
[19:58:26] djbkd: has joined #RubyOnRails
[19:59:31] pawnbox: has joined #RubyOnRails
[20:00:27] Radar: ACTION places money on either 1) "I can't reproduce it now" or 2) "
[20:00:32] Radar: I'm actually working in a different branch"
[20:00:37] siaW: Radar: i’m trying to get that path again. and now i meet this: https://gyazo.com/b9b474f06b3c8bae52a0af3fc0c30302
[20:00:46] existensil: has joined #RubyOnRails
[20:00:53] Intii: has joined #RubyOnRails
[20:00:55] siaW: post is nested in accounts
[20:00:57] Radar: siaw: that path helper should be new_account_post_path(@account)
[20:01:04] dkam_: has joined #RubyOnRails
[20:01:14] Radar: siaw: because it's a nested route for accounts/:account_id/posts/new
[20:01:23] Radar: The first argument is an object which will fill in that :account_id attribute.
[20:01:34] helpa: http://guides.rubyonrails.org/routing.html
[20:02:19] siaW: now the first error is gone
[20:03:14] yellow51: has joined #RubyOnRails
[20:03:22] jfelchner: has joined #RubyOnRails
[20:03:48] trosborn: has joined #RubyOnRails
[20:04:07] ur5us: has joined #RubyOnRails
[20:04:17] djbkd: has joined #RubyOnRails
[20:04:27] siaW: Radar: thanks. looks like it’s working like expected
[20:04:39] aegis3121: has joined #RubyOnRails
[20:05:27] baweaver: has joined #RubyOnRails
[20:05:35] Intii: Running ps aux | grep rails returns this: /tmp/nack.327.8013427569.sock
[20:05:39] Intii: That means rails still running right?
[20:05:58] djbkd: has joined #RubyOnRails
[20:05:59] dionysus69: has joined #RubyOnRails
[20:07:18] danielz1: has joined #RubyOnRails
[20:07:57] benlieb: has joined #RubyOnRails
[20:08:06] Palsson: has joined #RubyOnRails
[20:08:48] sbarg: has joined #RubyOnRails
[20:11:06] dalbuschat: has joined #RubyOnRails
[20:14:25] trosborn: has joined #RubyOnRails
[20:15:05] siaw_: has joined #RubyOnRails
[20:17:08] Cervajz: has joined #RubyOnRails
[20:17:16] fox_mulder_cp: intii: killall -9 ruby %)
[20:17:34] Intii: And that should kill everything running under the ruby process right?
[20:18:08] sbarg: has left #RubyOnRails: ()
[20:18:40] defsdoor: has joined #RubyOnRails
[20:19:41] norfumpit: has joined #RubyOnRails
[20:19:41] Cervajz_: has joined #RubyOnRails
[20:19:52] DEA7TH: has joined #RubyOnRails
[20:19:59] kgutteridge: has joined #RubyOnRails
[20:20:06] snowy: has joined #RubyOnRails
[20:21:16] DoctorMonocular: has joined #RubyOnRails
[20:22:33] norfumpit: so i got a view spec (rspec) where the view is using a method defined in the controller it usually renders from (the method is included into the controller from a controller concern) ... so, not sure how to go about this, should i include the concern somehow in the view spec, should i stub something or what. please advise
[20:23:44] fertapric: has joined #RubyOnRails
[20:24:21] netzfisch: has joined #RubyOnRails
[20:24:46] norfumpit: i thought `allow(view).to receive(:my_method).and_return(:whatever)` would do it, but i get some huge error from this
[20:25:06] norfumpit: at the end of the error message is "does not implement my_method"
[20:25:59] bb2: has joined #RubyOnRails
[20:28:05] mcemil: has joined #RubyOnRails
[20:28:46] ss_much: has joined #RubyOnRails
[20:29:32] pawnbox: has joined #RubyOnRails
[20:29:37] Jasaka: As I seemingly don't have a .bundle directory, could that be the problem causing "../projekt/gemfile not found" when trying 'rake db:migrate' or 'rails s'? If yes, how do I fix it?
[20:34:54] Radar: siaw: MAGIC
[20:35:12] Radar: Jasaka: I think what would cause that error is if Gemfile isn't present.
[20:35:16] siaW: Radar: i don’t like this kind of magic
[20:35:45] Jasaka: But I have a Gemfile present.
[20:35:45] enitiz: has joined #RubyOnRails
[20:36:34] Radar: Jasaka: Show us the full error message please, with no replacements.
[20:37:06] Zackio: has joined #RubyOnRails
[20:37:21] n008f4g_: has joined #RubyOnRails
[20:38:31] maesitos: has joined #RubyOnRails
[20:38:32] Jasaka: Radar: Its only this: "/home/jasaka/Work/Git/WebPromillo/projekt/gemfile not found" I'm running: "~/Work/Git/WebPromillo/projekt$ rails s"
[20:38:51] Radar: Jasaka: "ls Gemfile" in that directory please.
[20:39:23] Jasaka: returns "Gemfile"
[20:39:29] bronson: has joined #RubyOnRails
[20:40:10] Radar: Jasaka: Do you have a .bundle/config at that location?
[20:40:32] tubbo: <hint>that's funny, it's looking for project/gemfile and not projekt/Gemfile</hint> :)
[20:40:58] meoblast001: has joined #RubyOnRails
[20:41:26] banister: has joined #RubyOnRails
[20:43:23] Jasaka: Radar: No, I dont. tubbo: changing the case to gemfile doesnt helb either. Was the first thing I tried, resulting in "The git source git://github.com/activeadmin/activeadmin.git is not yet checked out. Please run `bundle install` before trying to start your application". Running 'bundle install' doesn't change anything.
[20:43:35] Radar: pragmatism: it works
[20:43:36] slash_nick: pragmatism: Pass
[20:43:39] yellow5: has joined #RubyOnRails
[20:43:47] Radar: pragmatism: 1 example, 0 failures
[20:44:03] Radar: Jasaka: I don't know then. Everything seems fine.
[20:44:13] Radar: Jasaka: Steps to reproduce this problem, please :)
[20:44:31] trinaldi: has joined #RubyOnRails
[20:45:03] Disavowed: has joined #RubyOnRails
[20:45:04] jottr: has joined #RubyOnRails
[20:46:37] emachnic: has joined #RubyOnRails
[20:49:10] netzfisch: has joined #RubyOnRails
[20:49:56] srinidhi: has joined #RubyOnRails
[20:50:06] Jasaka: Radar: I know :/ Drives me nuts for the last 8 hours. There really aren't steps to reproduce it , I merged two working local branches, without any merge conflicts (except some in .idea) as usual. Commited, tried it, got the output "/home/jasaka/Work/Git/WebPromillo/projekt/gemfile not found" for the first time. Tried ro revert back to the last working commit. Didn't help either. Now it doesn't matter wich branch I try it just doe
[20:50:16] jottr: has joined #RubyOnRails
[20:50:19] Radar: Jasaka: !consultant
[20:50:19] helpa: Jasaka: Your question, problem, and/or attitude requires more than free internet advice from an irc channel. May I suggest hiring a consultant or life coach?
[20:50:45] Radar: It's hard for me to help without seeing it happening on my own machine.
[20:51:48] nogic: has joined #RubyOnRails
[20:52:13] jottr: has joined #RubyOnRails
[20:52:43] stannard: has joined #RubyOnRails
[20:52:44] Jasaka: Radar: I know. Thanks for trying at least! Seems I'll need to try rebuilding from scratch.
[20:52:53] Pazician: has joined #RubyOnRails
[20:53:37] Radar: Jasaka: Do you have someone else who could try cloning that repo and running the same commands as you?
[20:54:52] yxejamir: has joined #RubyOnRails
[20:54:54] Jasaka: Radar: Yeah, we are three people. The same result with each of us.
[20:55:17] j3r0: has joined #RubyOnRails
[20:55:20] Radar: Jasaka: what version of Bundler?
[20:56:58] jeanlinux: has joined #RubyOnRails
[20:57:30] mrbubbles: has joined #RubyOnRails
[20:58:28] FernandoBasso: has joined #RubyOnRails
[20:59:44] pawnbox: has joined #RubyOnRails
[21:00:13] Jasaka: Radar: It's Bundler version 1.11.2
[21:00:13] benlieb: has joined #RubyOnRails
[21:00:13] jottr: has joined #RubyOnRails
[21:00:23] Radar: Jasaka: Ok, so a modern version. That checks out too.
[21:00:23] yxejamir: Hi, my PR has been sitting there for months, I checked on it today and saw a merge conflict. Once rebased, I pushed the branch again, only to see this seemingly unrelated CI build failure. Can someone point me in a direction, or at least tell me how to run this test locally on my workstation? Thanks. (OK to leave your feedback here: https://github.com/rails/rails/pull/22245)
[21:00:25] nogic: has joined #RubyOnRails
[21:00:28] Radar: Jasaka: I'm still without ideas.
[21:00:56] Radar: yxejamir: Did you read https://github.com/rails/rails/blob/master/activerecord/RUNNING_UNIT_TESTS.rdoc yet?
[21:03:37] jottr: has joined #RubyOnRails
[21:03:48] yxejamir: Radar: tried ruby -I test test/integration/queuing_test.rb, in the activejob/ directory, got many NoMethodError: undefined method `adapter_is?' for #<QueuingTest:0x0000000229eaa8>
[21:03:49] slash_nick: yxejamir: that particular build failure has been documented: https://github.com/rails/rails/issues/23942
[21:04:35] yxejamir: slash_nick: awesome, thanks!
[21:04:46] slash_nick: I'm surprised no team member has given that a "green light" :/
[21:04:56] tubbo: yxejamir: fwiw one thing you can do is re-run the build on travis
[21:05:10] tubbo: especially if that build failure is documented
[21:06:13] Intii: has joined #RubyOnRails
[21:06:15] joshkovach: has joined #RubyOnRails
[21:06:35] Jasaka: Radar: Yeah, weird stuff. Thanks a lot for your time and effort! At least there's someone else not making sense of it.
[21:06:44] jottr: has joined #RubyOnRails
[21:08:03] yxejamir: Rebased and pushed again. (Any other way to force a rebuild? I am new to contributing to Rails.)
[21:08:22] adre: has joined #RubyOnRails
[21:08:51] nerium: has joined #RubyOnRails
[21:09:41] jottr: has joined #RubyOnRails
[21:09:58] tubbo: yxejamir: oh never mind i'm sorry, guess only project maintainers have access to force travis rebuilds
[21:10:07] Mia: has joined #RubyOnRails
[21:10:07] Mia: has joined #RubyOnRails
[21:10:11] DoctorMonocular: has joined #RubyOnRails
[21:10:20] Intii: has joined #RubyOnRails
[21:10:38] jenrzzz: has joined #RubyOnRails
[21:11:06] defsdoor: has joined #RubyOnRails
[21:12:45] jottr: has joined #RubyOnRails
[21:13:42] jottr: has joined #RubyOnRails
[21:14:52] tetraktys: has joined #RubyOnRails
[21:15:01] acosonic: has joined #RubyOnRails
[21:17:24] thorgi: has joined #RubyOnRails
[21:17:55] slash_nick: yxejamir: i'm not sure... maybe git push -f, even without changes?
[21:18:01] arBmind: has joined #RubyOnRails
[21:18:37] jottr: has joined #RubyOnRails
[21:19:03] workmad3: has joined #RubyOnRails
[21:19:39] jottr: has joined #RubyOnRails
[21:19:58] cnr_roxx: has joined #RubyOnRails
[21:20:05] yxejamir: I don’t think so, as -f only makes a difference if the update is not fast-forward on the remote. Ok, just tried it, git says “Everything up-to-date” without pushing anything.
[21:20:51] jottr: has joined #RubyOnRails
[21:22:37] thorgi: has joined #RubyOnRails
[21:24:47] jottr: has joined #RubyOnRails
[21:25:30] groatyoats: has joined #RubyOnRails
[21:26:25] baweaver: has joined #RubyOnRails
[21:26:29] unreal_: has joined #RubyOnRails
[21:27:23] hangelo: has joined #RubyOnRails
[21:28:02] emachnic: has joined #RubyOnRails
[21:28:32] intrigueD: has joined #RubyOnRails
[21:33:22] uglybandersnatch: has joined #RubyOnRails
[21:34:26] cabargas: has joined #RubyOnRails
[21:40:36] fertapric: has joined #RubyOnRails
[21:41:19] FLeiXiuS: has joined #RubyOnRails
[21:41:39] FLeiXiuS: Which bootstrap is preferred now-a-days?
[21:41:59] fox_mulder_cp: FLeiXiuS: stable, anyway
[21:42:05] tvw: has joined #RubyOnRails
[21:42:12] Radar: Only the strappiest of the bootstraps.
[21:42:24] FLeiXiuS: Radar, I love a good bootstrap mm
[21:42:25] fox_mulder_cp: FLeiXiuS: or if u want more bugs - use git :_
[21:42:47] LowTemplar: has joined #RubyOnRails
[21:44:12] tubbo: git prevents bugs
[21:44:19] tubbo: unless you don't know how to use git i suppose
[21:44:38] LowTemplar: Hello! I'm working on a project and I want to use MySQL 5.5, but I don't really understand how I can do this. Is it as simple as listing mysql5 in my gemfile?
[21:45:18] mustmodify___: has joined #RubyOnRails
[21:45:44] slash_nick: giggity prevents butts
[21:45:46] djbkd: has joined #RubyOnRails
[21:46:49] fox_mulder_cp: LowTemplar: in all topics about rails + sql i see a step by step manual, for how to use it
[21:47:44] a1fa: has joined #RubyOnRails
[21:47:47] jeanlinux: has joined #RubyOnRails
[21:47:56] mustmodify___: what's the name for writing an instance method to hide underlying implementation, like ... a presenter class that has font_size instead value_presenter.font.size
[21:48:18] a1fa: hello, i have start_date and end_date (beginning of the year, and end of year, and i woud like to iterate over every month
[21:48:45] tetraktys: has joined #RubyOnRails
[21:48:47] cnk: LowTemplar: You need to have mysql running somewhere
[21:48:47] mustmodify: changed my nick. Same question. :)
[21:48:56] tubbo: mustmodify: dunno what you mean
[21:49:09] momomomomo: has joined #RubyOnRails
[21:49:10] cnk: So either set it up on yoru dev machine - or have a running MySQL instance you can connect to
[21:49:19] dkam_: has joined #RubyOnRails
[21:49:23] pawnbox: has joined #RubyOnRails
[21:49:29] cnk: then adding the mysql gem to your gemfile will let you connect from rails
[21:50:16] mustmodify: tubbo: maybe your lack of clarity comes from my lack of clarity, which is why I couldn't figure out the name in the first place. :)
[21:50:30] tubbo: mustmodify: i just don't know what you want
[21:50:35] allcentury: has joined #RubyOnRails
[21:50:36] tubbo: mustmodify: !gist would help
[21:50:36] helpa: mustmodify: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[21:51:12] mustmodify: tubbo: I want a name for a pattern. If it's a pattern and not just something I do to keep things straight in my brain. I'll work up a readable example.
[21:51:41] fertapric: has joined #RubyOnRails
[21:51:58] tubbo: mustmodify: afaik there's no pattern or naming convention
[21:55:13] mustmodify: tubbo: https://gist.github.com/mustmodify/c14191744145b12d6616#file-gistfile1-txt-L13
[21:57:44] tubbo: mustmodify: yeah i don't know of a particular name for that "pattern"
[21:57:50] tubbo: mustmodify: maybe law of demeter or something? haha
[21:57:51] xploshioon: has joined #RubyOnRails
[21:58:04] mustmodify: tubbo: anti-law-of-dermeter. :)
[21:58:19] xploshioon: hi people, anyone know how can I solve this error? Mcrypt::InvalidKeyError (Key length 15 is not supported by tripledes.)
[21:58:34] mustmodify: use another key length?
[21:58:48] mustmodify: I would try 16 but that's just a guess... powers of 2 probably.
[21:59:06] flip_digits: has joined #RubyOnRails
[21:59:08] tubbo: law of durr meter
[22:00:00] xploshioon: where do I change that? that error happens when the bank sends me a notification with a json
[22:00:20] tubbo: xploshioon: !vauge
[22:00:22] tubbo: xploshioon: !vague
[22:00:22] helpa: xploshioon: Your question has just been deemed vague; please consider rewording it. It may also help to give us any relevant code or errors so that we may better assist you.
[22:00:54] xploshioon: ok, let me gist this
[22:00:55] tubbo: unfortunately you're asking us some pretty loaded questions that rely on being privy to how your app is specifically working under the hood
[22:01:01] flip_digits: Does anyone know how I can get this error "ActiveRecord::UnknownAttributeError in Admin::UsersController#update" when I my user model has that method?
[22:01:11] tubbo: but hey, that's what humans are for :)
[22:01:11] andybernard: has joined #RubyOnRails
[22:01:17] sandroandrade: has joined #RubyOnRails
[22:01:25] mustmodify: tubbo: I just refactored two classes (on different days, I would guess) but basically back-to-back. They have pretty similar functionality. In one, I choose to expand a bunch of those and get rid of the methods. In the other, I choose to make a bunch of those methods. Just interesting. I don't guess there's a "right" answer, just interesting.
[22:01:37] tubbo: flip_digits: you're passing an attribute in the params hash that your model doesn't understand.
[22:01:52] DoctorMonocular: has joined #RubyOnRails
[22:01:56] flip_digits: This only blows up for admin users
[22:02:07] tubbo: mustmodify: actually, there is a right answer: shit or get off the pot ;)
[22:02:24] mustmodify: tubbo: ... ?
[22:02:39] tubbo: mustmodify: in other words, write these presenters in one, consistent style. same is better than better.
[22:02:40] flip_digits: tubbo: but I do have it in the params
[22:02:57] tubbo: flip_digits: my comment stands.
[22:03:04] mustmodify: flip_digits: So you're saying Rails is making up attribute keys?
[22:03:21] benlieb: has joined #RubyOnRails
[22:03:46] flip_digits: Why would it work for regualr users but blow up for admin users?
[22:03:57] mustmodify: In principle I agree with tubbo and suggest you question your assumptions. One other suggestion, though... you might restart your server. Under unusual conditions that has caused issues for me.
[22:04:17] flip_digits: Ok I'll try that
[22:04:19] mustmodify: flip_digits: perhaps because the form, and therefore the parameters, are different?
[22:04:47] tubbo: flip_digits: !gist of the log messages in the response ("Started GET..") and ("Parameters:
[22:04:47] helpa: flip_digits: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[22:04:51] flip_digits: I have them on both the users controller params and the admiusers params
[22:04:52] tubbo: mgiht help
[22:05:45] flip_digits: I'll have to get permissoin before I post the gist
[22:06:52] maesitos: has joined #RubyOnRails
[22:08:01] xploshioon: ok @tubbo here it is https://gist.github.com/xploshioOn/c4df518cc09416fe5f31
[22:08:26] xploshioon: I receive a post with data, and that's the action, the data and the error
[22:09:20] acosonic: what does this || mean in ruby? for example in this line numbers.each {|num| puts num } ?
[22:10:14] wethu: has joined #RubyOnRails
[22:10:20] tubbo: xploshioon: sorry, the gist probably messed up the line numbers...can you just check what line "app/controllers/payments_controller.rb:24:in `validate'" refers to in your code/
[22:10:22] allcentury: has joined #RubyOnRails
[22:10:28] tubbo: xploshioon: like i know it's line 24, but what is line 24 in the context of this gist?
[22:10:47] xploshioon: if remote_response.valid? && remote_response.success?
[22:11:14] xploshioon: and it goes to here, the valid and success
[22:11:15] xploshioon: https://github.com/ritxi/sermepa_web_tpv/blob/master/lib/sermepa_web_tpv/response.rb
[22:11:19] ppinkert_: has joined #RubyOnRails
[22:12:49] bronson: has joined #RubyOnRails
[22:12:54] stannard: has joined #RubyOnRails
[22:12:57] mices: https://gist.github.com/mices/f9516cb3ea9da3f3c690
[22:13:53] DragonPunch: has joined #RubyOnRails
[22:14:07] DragonPunch: First time rails user with NodeJS background, any getting started guide?
[22:14:15] DragonPunch: That I can quickly go through to set everything up?
[22:15:22] fox_mulder_cp: DragonPunch: official guide $)
[22:15:39] Radar: DragonPunch: what OS?
[22:15:49] xploshioon: @acosonic with that you are saying that every number, in numbers is "num"
[22:16:00] Radar: DragonPunch: Here's a guide for you: http://ryanbigg.com/2015/06/mac-os-x-ruby-ruby-install-chruby-and-you/
[22:18:22] DoctorMonocular: has joined #RubyOnRails
[22:19:22] pawnbox: has joined #RubyOnRails
[22:21:43] emachnic: has joined #RubyOnRails
[22:22:38] Somnius: has left #RubyOnRails: ()
[22:23:28] htmldrum: has joined #RubyOnRails
[22:24:49] n008f4g_: has joined #RubyOnRails
[22:25:26] bool_: has joined #RubyOnRails
[22:25:51] djbkd: has joined #RubyOnRails
[22:28:46] Devalo: has joined #RubyOnRails
[22:30:59] kgutteridge: has joined #RubyOnRails
[22:31:02] zave: has joined #RubyOnRails
[22:32:30] Limix: has joined #RubyOnRails
[22:32:31] treehug88: has joined #RubyOnRails
[22:32:53] KensoDev: has joined #RubyOnRails
[22:35:58] dkam_: has joined #RubyOnRails
[22:36:07] rubyonrails521: has joined #RubyOnRails
[22:38:27] openstruct: has joined #RubyOnRails
[22:38:31] rikkipitt: has joined #RubyOnRails
[22:38:58] TBAA: has joined #RubyOnRails
[22:39:07] Brando753: has joined #RubyOnRails
[22:39:37] hahuang65: has joined #RubyOnRails
[22:39:44] SteenJobs: has joined #RubyOnRails
[22:39:46] Megamos: has joined #RubyOnRails
[22:39:49] mices: i can't get data-description working in bluimp
[22:39:56] quazimodo: has joined #RubyOnRails
[22:41:24] Intii: has joined #RubyOnRails
[22:42:01] RTG`: has joined #RubyOnRails
[22:42:42] kdough: has joined #RubyOnRails
[22:42:44] superlou: has joined #RubyOnRails
[22:43:15] nullwarp: has joined #RubyOnRails
[22:46:59] ppinkerton: has joined #RubyOnRails
[22:47:58] Intii: has joined #RubyOnRails
[22:48:10] ql6wlld: has joined #RubyOnRails
[22:48:14] jeanlinux: has joined #RubyOnRails
[22:49:26] pawnbox: has joined #RubyOnRails
[22:49:33] Megamos: has joined #RubyOnRails
[22:50:46] Intii: has joined #RubyOnRails
[22:51:00] jeanlinux: has joined #RubyOnRails
[22:51:39] Nuck: has joined #RubyOnRails
[22:52:04] snowy: has joined #RubyOnRails
[22:52:21] Contigi: has joined #RubyOnRails
[22:53:36] Pazician: has joined #RubyOnRails
[22:54:37] kirillzh: has joined #RubyOnRails
[22:55:30] kirillzh: has joined #RubyOnRails
[22:56:36] kirillzh: has joined #RubyOnRails
[23:00:28] goodcodeguy: has joined #RubyOnRails
[23:00:33] siaW: has joined #RubyOnRails
[23:01:01] jeanlinux: has joined #RubyOnRails
[23:04:07] trosborn: has joined #RubyOnRails
[23:04:22] Jasaka: Radar: Thanks for the help! It was a really stupid routing error which I overlooked 3 times in boot.rb. Error in front of keyboard not in computer. Have a great day/night!
[23:04:39] Radar: Jasaka: A routing error in boot.rb?
[23:04:47] Radar: Jasaka: Can you show me what you mean?
[23:05:47] Jasaka: ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../gemfile', __FILE__)
[23:06:08] benlieb: has joined #RubyOnRails
[23:06:19] Jasaka: so tubbo was kind of right ^^"
[23:07:29] josephkokenge: has joined #RubyOnRails
[23:08:01] Jasaka|NA: has joined #RubyOnRails
[23:10:01] baweaver: has joined #RubyOnRails
[23:10:25] workmad3_: has joined #RubyOnRails
[23:11:20] jottr_: has joined #RubyOnRails
[23:14:06] gaf_: has joined #RubyOnRails
[23:14:15] KnownSyntax: has joined #RubyOnRails
[23:14:24] Limix: has joined #RubyOnRails
[23:14:26] yellow5: has joined #RubyOnRails
[23:14:31] KnownSyntax: has joined #RubyOnRails
[23:14:54] bronson: has joined #RubyOnRails
[23:16:21] lacrymology: has left #RubyOnRails: ()
[23:18:22] Jon30: has joined #RubyOnRails
[23:18:38] Jon30: has joined #RubyOnRails
[23:19:21] jeanlinux: has joined #RubyOnRails
[23:20:13] Limix: has joined #RubyOnRails
[23:20:14] Radar: Jasaka|NA: Aha!
[23:20:33] pawnbox: has joined #RubyOnRails
[23:21:49] helpa: has joined #RubyOnRails
[23:24:18] uglybandersnatch: has joined #RubyOnRails
[23:29:53] zave: hi all, anyone here running a rails app in a docker container? i wondering about some configuration details.
[23:30:08] agent008: has joined #RubyOnRails
[23:30:10] Demerzel: has joined #RubyOnRails
[23:30:39] Demerzel: hello folks
[23:30:42] agent008: has joined #RubyOnRails
[23:31:21] agent008: has joined #RubyOnRails
[23:31:42] Demerzel: quick question about best practices. i've a rails route that seems to be getting hit using the :html format vs. what it's meant to use (:js). Trying to find a way to deal with that elegantly
[23:31:56] agent008: has joined #RubyOnRails
[23:32:06] Demerzel: My current thought is to render nothing: true, status: :bad_request
[23:32:13] Demerzel: what would you do?
[23:34:56] _Tariq: has joined #RubyOnRails
[23:36:07] trosborn: i could be wrong but i don’t think this falls into best practices so much as ux design. like if you want to 404 them, there’s nothing unRails about that, per se.
[23:37:29] trosborn: if that were the case you could prolly just add a route constraint though, restricting that route to json
[23:37:46] Demerzel: not really about a 404 page as such but more about how should i handle a request coming in for the wrong format?
[23:38:08] Demerzel: route constraint means it'll return 404 then correct?
[23:38:24] trosborn: theerr sorry I mean 400 not 404
[23:38:49] _Tariq_: has joined #RubyOnRails
[23:38:53] allcentury: has joined #RubyOnRails
[23:39:05] Demerzel: looking through https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Client_Error i'm wondering what would be a semantically correct error code too
[23:39:18] Demerzel: I picked 400 earlier but 406 seems interesting and possibly relevant too
[23:40:35] trosborn: yeah okay reading the rails docs it looks like your method is the way to go, just return to 400 or whatever you want from the controller method
[23:41:11] trosborn: I think 400 is the right one since it is invalid data
[23:41:35] trosborn: because that’s supposed to be like “hey the response is jacked up, don’t resend this until you fix it”
[23:42:02] Demerzel: aight going with :bad_request (400)
[23:42:07] Rodya_: has joined #RubyOnRails
[23:42:07] Demerzel: thanks for helping me think through this :-)
[23:42:29] trosborn: no problem :)
[23:43:12] intrigueD: has joined #RubyOnRails
[23:43:34] gambl0re: has joined #RubyOnRails
[23:43:34] gambl0re: has joined #RubyOnRails
[23:43:38] KnownSyntax: has joined #RubyOnRails
[23:43:41] KnownSyntax: has joined #RubyOnRails
[23:45:02] Rodya_: has joined #RubyOnRails
[23:45:45] openstruct: has joined #RubyOnRails
[23:47:00] emachnic: has joined #RubyOnRails
[23:49:01] shanemcd_: has joined #RubyOnRails
[23:50:20] pawnbox: has joined #RubyOnRails
[23:53:21] maesitos: has joined #RubyOnRails
[23:54:11] trxtr: has joined #RubyOnRails
[23:55:39] jeanlinux: has joined #RubyOnRails
[23:56:32] y2mq37: has joined #RubyOnRails
[23:56:51] Intii: has joined #RubyOnRails
[23:58:19] Demerzel: aight peeps