orolo

Activity Graph

Page 1 of 2 | Next »

2016-07-14

[14:59:27] orolo: Quit: This computer has gone to sleep
[15:01:08] orolo: has joined #RubyOnRails
[15:07:55] orolo: Quit: This computer has gone to sleep
[15:13:02] orolo: Client Quit
[15:13:02] orolo: has joined #RubyOnRails

2016-07-13

[12:44:34] orolo: has joined #RubyOnRails

2016-07-12

[12:52:03] orolo: has joined #RubyOnRails
[14:54:43] orolo: Quit: This computer has gone to sleep
[14:55:33] orolo: has joined #RubyOnRails
[21:03:22] orolo: Quit: This computer has gone to sleep
[21:04:30] orolo: has joined #RubyOnRails
[21:04:51] orolo: Remote host closed the connection

2016-07-11

[12:45:18] orolo: has joined #RubyOnRails
[21:57:41] orolo: Quit: This computer has gone to sleep

2016-07-10

[00:58:19] orolo: has joined #RubyOnRails
[01:00:47] orolo: Client Quit

2016-07-08

[13:26:11] orolo: has joined #RubyOnRails
[16:55:28] orolo: Quit: This computer has gone to sleep
[17:15:46] orolo: has joined #RubyOnRails
[22:01:21] orolo: Quit: This computer has gone to sleep

2016-07-07

[13:12:48] orolo: has joined #RubyOnRails
[22:13:57] orolo: Quit: This computer has gone to sleep

2016-07-06

[13:08:16] orolo: has joined #RubyOnRails
[21:38:11] orolo: Quit: This computer has gone to sleep

2016-07-05

[19:33:55] orolo: has joined #RubyOnRails
[21:50:09] orolo: Quit: This computer has gone to sleep

2015-11-25

[14:35:28] orolo: has joined #RubyOnRails
[22:35:00] orolo: Ping timeout: 250 seconds

2015-11-24

[16:59:41] orolo: Quit: This computer has gone to sleep
[18:14:12] orolo: has joined #RubyOnRails
[22:48:04] orolo: Quit: This computer has gone to sleep

2015-11-23

[14:16:09] orolo: has joined #RubyOnRails

2015-11-20

[14:37:00] orolo: has joined #RubyOnRails
[17:45:12] orolo: Quit: This computer has gone to sleep
[17:45:30] orolo: has joined #RubyOnRails
[22:07:13] orolo: Quit: This computer has gone to sleep

2015-11-19

[17:17:15] orolo: Quit: This computer has gone to sleep
[18:34:14] orolo: has joined #RubyOnRails
[22:45:04] orolo: Quit: This computer has gone to sleep

2015-11-17

[07:19:10] orolo: Ping timeout: 240 seconds
[07:33:30] orolo: has joined #RubyOnRails
[08:43:33] orolo: Read error: Connection reset by peer
[08:43:54] orolo: has joined #RubyOnRails
[17:59:45] orolo: Ping timeout: 265 seconds
[18:00:20] orolo: has joined #RubyOnRails
[21:43:01] orolo: Ping timeout: 276 seconds
[22:31:36] orolo: has joined #RubyOnRails

2015-11-16

[14:14:00] orolo: has joined #RubyOnRails

2015-11-12

[03:21:18] orolo: Ping timeout: 265 seconds
[03:22:27] orolo: has joined #RubyOnRails
[13:03:14] orolo: Read error: Connection reset by peer
[13:03:39] orolo: has joined #RubyOnRails
[22:10:51] orolo: Ping timeout: 265 seconds

2015-11-10

[15:17:38] orolo: has joined #RubyOnRails

2015-11-03

[14:36:32] orolo: Quit: Leaving

2015-11-02

[14:14:45] orolo: has joined #RubyOnRails
[14:22:19] orolo: Ping timeout: 268 seconds
[14:22:30] orolo: has joined #RubyOnRails

2015-10-29

[14:00:33] orolo: Quit: This computer has gone to sleep
[14:29:33] orolo: has joined #RubyOnRails
[15:55:53] orolo: Quit: This computer has gone to sleep
[17:28:05] orolo: has joined #RubyOnRails
[18:35:58] orolo: Quit: This computer has gone to sleep

2015-10-27

[18:13:34] orolo: Quit: This computer has gone to sleep
[18:35:35] orolo: has joined #RubyOnRails

2015-10-26

[13:12:45] orolo: has joined #RubyOnRails

2015-10-23

[21:56:59] orolo: Quit: This computer has gone to sleep

2015-10-22

[13:38:13] orolo: has joined #RubyOnRails
[16:39:59] orolo: Read error: Connection reset by peer
[16:40:26] orolo: has joined #RubyOnRails

2015-10-21

[04:34:08] orolo: Ping timeout: 268 seconds
[04:34:51] orolo: has joined #RubyOnRails
[21:53:34] orolo: Ping timeout: 260 seconds

2015-10-20

[13:49:46] orolo: has joined #RubyOnRails

2015-10-19

[13:12:22] orolo: has joined #RubyOnRails
[15:27:52] orolo: Ping timeout: 272 seconds
[16:06:44] orolo: has joined #RubyOnRails
[22:10:02] orolo: Ping timeout: 272 seconds

2015-10-16

[00:08:47] orolo: has joined #RubyOnRails
[21:45:25] orolo: Quit: This computer has gone to sleep

2015-10-15

[23:30:18] orolo: Write error: Connection reset by peer
[23:30:53] orolo: has joined #RubyOnRails

2015-10-12

[13:24:37] orolo: has joined #RubyOnRails

2015-10-09

[21:46:51] orolo: Ping timeout: 240 seconds

2015-10-08

[13:34:31] orolo: has joined #RubyOnRails

2015-10-07

[19:21:20] orolo: has joined #RubyOnRails
[19:22:43] orolo: on my dev machine, i'd like to have some css files included from another directory outside of my current project. i'm not finding the right docs to do this. any ideas?
[19:25:17] orolo: shalsum, the apps need to be separate (one is a jekyl style guid auto-compiled from the the other porject).
[19:27:49] orolo: shalsum i also could extend the sprockets path. . . can that include paths outside of the rails app?
[19:32:51] orolo: shalsum, i'm trying to do something like : config.assets.prefix = "#{File.expand_path('..', Dir.pwd)}/sibling_app/app/assets/stylesheets"
[19:37:12] orolo: maybe i can put a symlink in my vendors directory.
[19:41:13] orolo: thanks smathy
[22:02:26] orolo: Ping timeout: 244 seconds

2014-12-03

[15:51:48] orolo: i have an array that contains enumerables. i'm able to a.find_index{ |d| d == 'val'} and then get that enumerable but is there a way to do it in one command? what i'm doing feels wrong.
[15:58:01] orolo: thanks apeiros

2014-09-12

[15:36:33] orolo: i need to test if the db is returning a specific string for a value that is not allowed to be accessed. so, instead of home phone number, the db will return 'xxx'. i'd like to do an 'after' filter for methods and "scrub" their instance variables prior to calling the view (in rails). how best to access those instance variables for the method?
[15:41:29] orolo: jhass, thanks. i thought this was a ruby question; my apologies
[16:04:34] orolo: i'm using an after_filter to scrub some secure values. i'm wondering if there is a 'method version' of ruby's 'instance_variables'. currently the entire array of class instance variables is being returned when i really only want instance variables set in a specific method(s)

2014-09-09

[17:47:10] orolo: i need to programmatically call a method on an object like so:
[17:48:17] orolo: @my_var.OrangeBalloon but 'Orange' is a var. so i need to contact 'color' + Balloon and call that method on @my_var.
[17:49:08] orolo: i was trying stuff like: @my_var."#{color}Balloon".send but that isn't right.
[17:49:33] orolo: cool. thanks Envek

2014-08-26

[15:28:26] orolo: why , (in Rails but that shouldn't matter), I can access object.param but in IRB when a create a Hash and try to reference it's keys the same way, i get method undefined?
[15:28:49] orolo: object.param is an active resource type object
[15:29:20] orolo: canton7, yeah, that's what i was guessing. i should be creating a class in IRB?
[15:29:55] orolo: ah, Struct. i'll try that, too. thanks canton7
[15:36:05] orolo: how do i get all Structs of type MyStruct?
[15:38:08] orolo: mvmd, i think i'm getting it.
[15:38:14] orolo: *nevermind.

2014-07-24

[19:46:12] orolo: in an erb file, does <%= call 'html_safe' ? and if so, where is it in the docs?
[19:47:03] orolo: thanks rhizome
[19:47:25] orolo: where is that <%= method defined in rails?

2014-07-22

[21:26:11] orolo: in a link_to path, i need to use a string and embed a variable like so: link_to ("my_action", "the_#{var}_path"). i need "the_#{var}_path" to be the_special_path
[21:30:24] orolo: bricker`work, let me check out url_for. thanks for the tips.

2014-06-30

[16:53:35] orolo: design question: i'm using a helper to add markup to list items. i'm implementing an infinite scroll. i can't access that helper method in the js. here comes the q:
[16:53:53] orolo: q: do i decorate that li in the controller and then return an array of li items?
[16:55:17] orolo: so, i from the mymodel.js.erb, i don't have access that the methods.
[21:34:48] orolo: in Rails 3, how do i bind events (javascript) to HTML appended from a view helper?
[21:36:00] orolo: rhizome, thanks. just checking if there was a convention
[21:39:35] orolo: i'll read up on ujs. thank you

2014-05-27

[15:23:52] orolo: i'm trying to set a variable to whichever of these is not nil: thing["left"].nil? || thing["right"].nil?. my gut says to do an if else but is there a ruby way?
[15:25:53] orolo: wow. thanks centrx . it's either an empty string or not an empty string.

2014-05-14

[01:12:33] orolo: i'm running bundle and it's failing because of a Gem::InstallError: celluloid requires Ruby version >= 1.9.2. the project is on Ruby 1.8.7.
[01:12:42] orolo: How do i find out which gem is requiring celluloid?
[01:12:53] orolo: it's not in the Gemfile or Gemfile.lock
[02:53:51] orolo: so if i need to use guard-rspec for ruby 1.8.7, where do i find which version to use?
[02:54:00] orolo: is there a resource?

2014-05-07

[15:05:43] orolo: from the result of Dir.pwd, i need to grab the name before the dot and after the /stuff in something like this: "/home/httpd/stuff/myname.thing/"
[15:07:44] orolo: thanks shevy
[15:14:33] orolo: thank you
[20:51:38] orolo: in rails 3, can the rails console display the current RAILS_ENV? i'm seeing uninitialized constant

2014-04-30

[01:44:36] orolo: i'm using an api to generate Books; the user types in an ISBN and then a book is added to their shelf; i have that query to the api in the book create controller but is there a standard pattern i should be using?

2014-04-28

[00:31:29] orolo: inside of my apps "rails console", i'm requiring the "ISBNdb" gem, creating a 'new' one but then getting "no method error"; gems included in my gem file should work as expected on the command line, correct?
[00:32:21] orolo: @myvar.class does return ISBNdb::Query so i can't figure out why it's methods wouldn't be available.
[00:37:59] orolo: Radar, thank you
[00:38:02] orolo: query here: https://gist.github.com/cernalpanic/11359027
[00:39:30] orolo: i think it's more of a general rails problem and i don't understand how to use the console.
[00:40:40] orolo: i can't call any of the classes methods even though my new object is of that class.
[00:41:32] orolo: https://github.com/sethvargo/isbndb
[00:41:45] orolo: i'm trying to recreate them verbatim
[00:44:59] orolo: I tried that first and same error.
[00:46:53] orolo: what i don't understand is, in the console, when i run @query = ISBNdb::Query. i get 'Display all 208 possibilities' and not one of the methods listed in the docs are in that list; i'm assuming just the basic 'Module' ones are what i have access to. i'm missing something.
[01:14:24] orolo: ugh. i just needed the issn dev key in the config.

2014-04-24

[21:32:09] orolo: i can't get my tests to run (anymore) and it's something to do w/ bundler and rake versions. so, my question, i think, is what are the steps to setup your rails environment once you pull down a git branch?

2014-04-11

[19:07:17] orolo: i'm trying to find out which method called a method in a controller. trying caller[0] gets me 'send_action'; is there a way to get more info?

2013-12-20

[14:10:35] orolo: i need to write a unit test for a method in /lib/controllers/mymodule.erb; but, the controller version calls mymodule.erb as a before_filter and mymodule.erb accesses params out of the request. how do i pass those params to to mymodule.rb when doing a unit test? here is my approach (which is not working) https://gist.github.com/cernalpanic/71e871332c6382928ff1
[15:15:36] orolo: if a before_filter takes the params from a request, how do you unit test that and send those params?
[15:25:05] orolo: i don't want to actually test a "get"; i just want to pass in the params hash from a test so i can unit test a method in a before filter. is this possible?
[16:03:31] orolo: am i doing this right? i want to UNIT test a "before_filter" method in my controller without actually making a get request. can i pass the params hash somehow?
[16:06:54] orolo: yeah; that's what i'm doing. i think i'm over-thinking it. thanks jtperreault

2013-12-19

[01:58:28] orolo: i'm having VCR (the plugin) trouble. the cassettes are working great except that i don't know how to make a post. here's a gist that shows what i'm trying: https://gist.github.com/cernalpanic/7c07b6fcefc99de4f090
[01:58:41] orolo: line 4 is the problem area.
[01:58:56] orolo: how do i send json as the body of a request?

2013-12-18

[23:11:09] orolo: new know how to POST JSON to a VCR.use_cassette test?
[23:11:25] orolo: i can't seem to find my example in the docs
[23:19:55] orolo: lethjakman, sorry for the poor wording. let me try again:
[23:20:21] orolo: when using "use_cassette", how do i post json to a controller? ok; let me gist.
[23:23:25] orolo: lethjakman, https://gist.github.com/cernalpanic/7c07b6fcefc99de4f090
[23:23:45] orolo: the problem is that i can't get VCR to accept that json payload.
[23:23:54] orolo: line 4 is incorrect.
[23:24:42] orolo: VCR is working great for GET and DELETE; it's just the POST payload i can't get setup. thanks for looking.
[23:25:05] orolo: lethjakman, docs?
[23:25:23] orolo: https://relishapp.com/vcr/vcr/v/2-8-0/docs/getting-started

2013-12-16

[17:27:19] orolo: i need some help with a routes test. here's a contrived example of whats going on: https://gist.github.com/anonymous/458955131ce4a9f8b0c5
[17:27:39] orolo: the generated url from the test isn't accounting for "canada" or "isa"
[17:28:37] orolo: terrellt, this was a contrived example.
[17:29:01] orolo: terrellt, ah; my apologies
[17:29:45] orolo: i believe the problem to be that the test is recognizing the first the defined match in routes.
[17:30:21] orolo: tubbo, ok. this is more an activity in me trying to learn.
[17:30:25] orolo: the routes work.
[17:30:42] orolo: tubbo, but i'd like to know how to get them to work.
[17:31:04] orolo: how can i pass that "match" param so the generated url knows to look for it?
[17:32:10] orolo: tubbo, ok; but the test is only working for canada; how do i make it work for usa?
[17:32:42] orolo: and 'canada' is working because (i'm guessing) it is defined first.
[17:34:01] orolo: tubbo, yup; that's what i was just wondering.
[17:34:16] orolo: (and yes, order does matter when changed).
[17:34:29] orolo: ok. thank you everyone. let me refactor a bit.

2013-12-13

[04:42:06] orolo: i'm wondering how to route a "DELETE example/17" and a "DELETE example" <-- no params on that 2nd one so i can delete all.
[04:42:50] orolo: both requests should go to "def destroy" so i can check for the param.

2013-10-05

[02:20:35] orolo: i'm creating an object via ajax and i'd like to return the object params via JSON so i can update my DOM with that form data. i have a standard create method: https://gist.github.com/cernalpanic/046dbf69849a2ff1c639
[02:20:53] orolo: but when i log out 'data' in my ajax call, i get the DOM returned to me as a string.
[02:21:30] orolo: what do i need to return, and how do i access it? thank you
[02:23:28] orolo: console.log rhizome
[02:24:33] orolo: yes, it is.
[02:24:59] orolo: rhizome: no, it wasn't
[02:25:05] orolo: (i was looking at wrong method)
[02:25:10] orolo: works now. thank you.
[03:47:16] orolo: i have a modal form that i'm rendering to create objects via ajax. but how do use that same modal form to edit an existing object? i'm not sure how to pass the object id to that form.
[03:49:11] orolo: i know the id of the object i want to update on the javascript side. how do i pass that id to my <%= form_for @thisObject %>
[03:56:50] orolo: rhizome. ok. still thinking about this.
[04:05:22] orolo: here's my q distilled: when i click a button on the dom, i use an ajax request to go to my method and return a JSON version of my object. in erb, how do i set that json object as a regular old rails @object?
[04:13:10] orolo: i can get it back as an object in my ajax success method; i'm trying to figure out how to pass it to an erb form_for.
[04:20:33] orolo: jun; ok, i get that part. in ruby, i do how access that var?
[04:22:18] orolo: oh, i'm thinking of a javascript var.
[04:23:06] orolo: in an ajax success call back, data.myObj contains a JSON version of the object i want to pass to the form. how to i pass that javascript version back into rails?
[04:23:42] orolo: is where i'm missing it.
[04:25:43] orolo: well, i'm trying to get it into a form_for @obj; rails is helping w/ dates and so it is breaking the date up into several sections; so i'm trying to get the actual obj.
[04:26:27] orolo: the form creates a month, day, year, minute second select inputs and so i'm trying to avoid reading those back in. but maybe i'll cut my losses and do that.
[04:26:42] orolo: thanks jhn
[04:29:19] orolo: no, internal
[04:30:51] orolo: hmm. yeah, i'll that; no, i think you are; i'm trying to share a form on one page for create and update and am getting confused.
[04:33:16] orolo: haha. yeah.
[04:35:24] orolo: ok, i'll try it again; i'm making some extra work for myself.

2013-09-02

[14:15:37] orolo: i have a test for adding a 'link' that checks if that link already exists. i'd like to pass that message on to js (ajax) from my create method in the controller; i'm not sure how to grab that "server message", though. any ideas?
[14:17:19] orolo: so, in the console, i see a "Link Exists" message when the server won't add the record because the link already exists; i'd like to access that message in the controller.
[14:25:37] orolo: oop. emergency. i have to run. thank you

2013-08-28

[02:02:17] orolo: i'm sending a form need to set a param that i typically use an input for. how do i send a param in a form?
[02:03:44] orolo: thanks dsrx. i'll read about it.
[02:04:38] orolo: great. thx.
[03:28:42] orolo: https://gist.github.com/cernalpanic/040aa46d07b8e2f4fefa <-- trying to pass a variable in a hidden field but it comes up nil.
[03:31:10] orolo: sevenseacat: i'm googling what you mean.
[03:32:08] orolo: sevenseacat: you mean what html is returned from the create action?
[03:33:46] orolo: sevenseacat: https://gist.github.com/cernalpanic/b02de0d38c6c4aac982d
[03:34:22] orolo: value is wonky. i was hardcoding for debug; let me set it back.
[03:38:37] orolo: sevenseacat: that was it. thank you.

2013-08-19

[02:27:23] orolo: i have a method on my model that i need to pass a param to from a view. here's what i'm trying: https://gist.github.com/cernalpanic/dcec0d0b78b4498f7507
[02:27:34] orolo: "wrong number of arguments 0 for 1"
[02:34:01] orolo: tigris_: you are correct: 1 for 0.

2013-07-27

[14:14:31] orolo: how do you deal w/ has_many relationships where a member might not exist in the view? seems like there could be a better way then testing .nil? dozens of times for properties
[14:19:14] orolo: what if there is no foo? elaptics?
[14:19:28] orolo: elaptics: ok; 1 sec
[14:20:23] orolo: https://gist.github.com/cernalpanic/580f09cb894d887d2cd4
[14:39:29] orolo: elaptics: yes, venue has_many shows. show belongs_to venue. but a show might not HAVE a venue.
[14:39:46] orolo: or, belong_to, i should say.
[14:42:29] orolo: elaptics: ah! ok. i think that is what i was looking for: eager load.
[14:42:38] orolo: elaptics: thanks.
[14:43:25] orolo: elaptics: i'll read up.
[15:12:47] orolo: ok; still don't have this figured out;
[15:13:13] orolo: so, if i have a belongs_to relationship but there may not be a member on that belongs_to; where best to handle that?
[15:14:06] orolo: my view has a lot of table columns that will print the contents of that belongs_to member but they break if the object doesn't exist.
[15:15:58] orolo: asdfoo: ok, so create a default object in the controller and do @thing = Thing.find(col_id) || FakeThing. ?
[15:16:38] orolo: elaptics: well, it's going to get more complex so i'm trying to figure this out early on.
[15:17:20] orolo: asdfoo: that makes sense to me. thanks.
[15:18:26] orolo: elaptics: ah. null object pattern. ok, i'll read up on presenters and decorators before i start writing. thanks.
[15:18:55] orolo: elaptics: cool; i bought a subscription. :) good stuff.
[15:20:49] orolo: elaptics: i'll do the research; i'm hoping to understand the rails way of handling these types of null relationships and expanding on it. my brain seems to work that way, anyway.
[15:20:55] orolo: elaptics: great!

2013-07-23

[02:07:54] orolo: it's still a little fuzzy atm