sunya7a

Activity Graph

Page 1 of 4 | Next »

2019-04-22

[22:16:34] sunya7a: Ping timeout: 250 seconds

2019-04-13

[16:50:01] sunya7a: *.net *.split

2019-03-30

[11:21:53] sunya7a: has joined #RubyOnRails

2018-08-29

[10:36:28] sunya7a: i use image_tag to refer to load an image in my view which is working in development. In production however, the image is not loaded and I get a routing error. I have precompiled my assets and I see the file in quesiton with its fingerprint in the public/assets folder. additionally when I inspect the html on the page it uses /images/image_file as source without the fingerprint. Could anyone point me to a resource that might help resolve this. I
[10:43:53] sunya7a: I just tried switching it both ways and it still won't load. My understanding is that when you precompile the assets are placed in public/assets. my stylesheets and js are loading correctly so it seems that this is correct. only images are problematic
[10:45:57] sunya7a: i suspect it has something to do with how i'm loading the image. as i said i use image_tag helper...is this not the correct use?
[10:47:14] sunya7a: I placed it in app/assets/images/brand.png and I reference it with image_tag('brand')
[10:52:05] sunya7a: tbuehlmann: i believe this is right...i wonder if it's because my image_tag is nested inside a button_tag...maybe rails is having trouble adding the fingerprint?
[10:52:29] sunya7a: tbuehlmann: i will just putting it plainly on the page
[10:57:02] sunya7a: tbuehlmann: that didn't work either...it still just references the simple path like this <img src="/images/brand" alt="Brand"> ... how do i tell image_tag to use the fingerprinted version?
[11:02:31] sunya7a: tbuehlmann: I found the problem...it's as simple as keeping the file extension =(
[11:02:36] sunya7a: tyvm for listening
[12:22:13] sunya7a: tbuehlmann: well...to be fair...it does work in development...it just broke in production

2018-08-21

[15:45:23] sunya7a: Ping timeout: 256 seconds

2018-08-14

[00:57:12] sunya7a: *.net *.split
[01:04:29] sunya7a: has joined #RubyOnRails

2018-08-09

[09:29:57] sunya7a: hi all. I'm having trouble with validating a new child record before allowing it and its parent to save. specifically, when using a custom method validator within the child model the newly created record fields are all nil and so I cannot validate any of the fields. Here's the relevant code: https://gist.github.com/sunya7a/6a14ed35cbfca5765688f940d614b33a please let me know if you want to see other parts that would help cleariify this
[09:41:15] sunya7a: dionysus69: thanks...i've added that but the result is the same
[09:42:37] sunya7a: dionysus69: i made a toy app to test the behavior, and as I expected, usually at that exact point the child element should have fields filled, except the id, since it is a new object and not saved yet. but in my app, everything is nil, which is confusing me
[09:43:11] sunya7a: if I let it continue though both the child and parent objects save correctly with all the information
[09:43:52] sunya7a: so it seems somehow the validator is run early? not sure why or how to delay it until the fields are filled in with the parameters coming from the form
[09:53:34] sunya7a: Andr3as: it simply creates the child object. somehow it fills in the information after the validator call
[09:53:57] sunya7a: dionysus69: i'm trying to formulate a better explanation...it's a bit complicated
[09:57:04] sunya7a: the order of events is: i submit the form and I don't see any db insertions before hitting my byebug within the validator. at this point self properties are all nil. then I continue and I see all the insertions into db and child is created including the join records
[09:58:35] sunya7a: I tried putting a byebug statement inside th econtroller and calling the update manually to see what happens...it also stops at the byebug line in the validator with self properties being nil
[10:01:43] sunya7a: dionysus69: hopefully this explains the issue: https://gist.github.com/sunya7a/b3d8377bec8b00684dcf3e3be0f6372a

2018-08-08

[11:24:33] sunya7a: has joined #RubyOnRails

2018-05-20

[18:44:00] sunya7a: *.net *.split

2018-05-10

[18:20:26] sunya7a: has joined #ruby
[18:20:26] sunya7a: has joined #RubyOnRails

2018-05-07

[20:53:24] sunya7a: *.net *.split

2018-04-25

[12:29:01] sunya7a: has joined #ruby
[12:29:01] sunya7a: has joined #RubyOnRails
[15:01:06] sunya7a: *.net *.split
[15:03:08] sunya7a: has joined #RubyOnRails
[15:03:29] sunya7a: has joined #ruby

2018-04-05

[00:51:15] sunya7a: *.net *.split

2018-01-02

[13:57:24] sunya7a: has joined #ruby

2017-11-30

[15:01:33] sunya7a: has joined #RubyOnRails

2017-11-25

[06:49:56] sunya7a: has joined #RubyOnRails
[07:24:49] sunya7a: Ping timeout: 248 seconds

2017-11-24

[04:09:29] sunya7a: has joined #RubyOnRails
[04:10:08] sunya7a: hello all. With the new form_with replacing form_for....is there an alternative fields_for as well?
[04:31:42] sunya7a: Ping timeout: 260 seconds
[08:13:46] sunya7a: has joined #RubyOnRails
[10:23:42] sunya7a: Ping timeout: 240 seconds
[13:14:52] sunya7a: has joined #RubyOnRails
[14:04:13] sunya7a: Quit: Leaving
[15:14:28] sunya7a: has joined #RubyOnRails
[17:30:57] sunya7a: Ping timeout: 240 seconds

2017-11-09

[06:15:04] sunya7a: Ping timeout: 248 seconds

2017-11-06

[06:31:53] sunya7a: *.net *.split
[07:11:59] sunya7a: has joined #RubyOnRails

2017-10-12

[02:53:29] sunya7a: if I have a joining model with additional data in it that is required...how do i join A to B while also setting that value at the same time?
[02:55:27] sunya7a: also...can I do this on the fly while adding multiple relationships? A.relation_things << [b1, b2]

2017-09-28

[18:53:23] sunya7a: has joined #RubyOnRails

2017-09-12

[23:48:55] sunya7a: Ping timeout: 240 seconds

2017-08-25

[12:35:57] sunya7a: *.net *.split
[12:35:59] sunya7a: has joined #RubyOnRails

2017-08-08

[18:22:57] sunya7a: Ping timeout: 240 seconds
[20:41:21] sunya7a: has joined #RubyOnRails

2017-08-04

[17:12:38] sunya7a: hi, Is it possible to create a dropdown or radio button form element that allows a write in on an answer choice...sort of like a follow up field?

2017-06-28

[20:04:31] sunya7a: When loading a particular view in my system I see a lot of messages prepended with CACHE in my logs. Is this a serious issue or is this something I can ignore? I often look for n+1 query problems and resolve them when I see them but this CACHE is something I"m not sure about
[20:18:15] sunya7a: jaegerca: okay...so safe to ignore...i think it's being called several times because I have a piece of code in the view that draws from a table to come up with a list of choices
[20:19:14] sunya7a: jaegerca: i guess i should cache the list as an instance variable in the controller instead...or would you say that seeingn CACHe multiple times has no performance issues
[20:22:28] sunya7a: jaegerca: thank you

2017-06-20

[00:13:21] sunya7a: Remote host closed the connection
[00:13:44] sunya7a: has joined #RubyOnRails
[00:13:45] sunya7a: has joined #ruby
[00:17:07] sunya7a: *.net *.split
[00:22:34] sunya7a: has joined #RubyOnRails
[00:22:50] sunya7a: has joined #ruby

2017-06-14

[18:26:21] sunya7a: What replaced sortable_element in rails 5? I can't seem to find when it was removed and what it was replaced with

2017-06-09

[17:46:58] sunya7a: Is there an option to do link_to 'back', :back that will include page anchors?
[18:14:02] sunya7a: arup_r: i wanted to go to another page. I ended up solving it another way...thank you =)

2017-06-07

[18:40:00] sunya7a: rails automatically builds an empty instance of an associated model with model.associations.build. What if I want to dispaly a list of those associations as well as a form to create more on the same page. How do I prevent it from throwing an error when iterating over model.associations and hitting the empty one?
[18:40:57] sunya7a: is this not a common use case? showing the existing ones and providing a form to add another one quickly? I feel like there should be a way to do this without adding logic in the iteration to skip over empties
[18:57:14] sunya7a: tbuehlmann: thank you...i think that's a very clean solution

2017-05-19

[19:20:16] sunya7a: is it possible to direct a controller to load a view with a specific anchor? for example i know you can do something like edit_project_path(@project, anchor: "start-here")
[19:21:05] sunya7a: should i be using redirect_to or render perhaps?

2017-05-14

[21:43:10] sunya7a: Ping timeout: 268 seconds

2017-05-04

[17:20:59] sunya7a: hello all. Could someone help me with the following query: https://gist.github.com/anonymous/24d3ef0be8f41d0d6aff7a7bbc951190
[17:21:20] sunya7a: I'm wondering if there's a way to combine loading the user: :profile instead of calling it twice

2017-05-03

[14:34:46] sunya7a: has joined #ruby

2017-05-02

[15:15:48] sunya7a: I'm using foundation abide and have trouble with invalid fields that are marked for destruction. how do i tell abide to ignore these fields so that I can submit the form?

2017-05-01

[16:41:12] sunya7a: *.net *.split

2017-04-21

[20:08:23] sunya7a: hi all, I have a many-to-many relationship between two models A and B. In an edit form to update model A, i would like the user to type in the name of model B to associate to. How do I tell rails to check for the existence of a model B record and associating A to B before trying to create a new entry in B? I'm using accepts_nested_attributes_for and saving works...only it continues to create a new record for B

2017-04-18

[14:07:31] sunya7a: Client Quit
[14:08:17] sunya7a: has joined #RubyOnRails

2017-04-13

[15:10:51] sunya7a: *.net *.split

2017-04-11

[13:35:55] sunya7a: good morning all
[13:40:39] sunya7a: blergmat: are you forgetting whitelisting when using strong params?

2017-04-10

[12:05:53] sunya7a: Radar: good evening. did you have a chance to take a peek at that where query. what's your opinion on the safety of it?
[22:54:02] sunya7a: hi...i seem to have trouble loading javascript files that have periods in their name using rails 5. is there a way around that or is the only way to replace with underscore? I tried putting quotes around it in application.js but noluck
[22:54:49] sunya7a: dminuoso: =)
[22:55:21] sunya7a: Radar: rails says that it can't find the file
[22:56:03] sunya7a: Radar: couldn't find file 'jquery.mark.es6' with type 'application/javascript'
[22:56:36] sunya7a: Radar: it lists where it looks and i put it in /vendor/assets/javascripts. When i do the underscore substitution it works
[23:00:04] sunya7a: Radar: i see jquery.turbolinks in application.js .. so i don't understand why it doesn't like this one
[23:10:45] sunya7a: Radar: the full name is 'jquery.mark.es6.js'
[23:10:51] sunya7a: Radar: let me try removing es6
[23:11:57] sunya7a: Radar: yup...that's it

2017-04-09

[21:35:46] sunya7a: i have a question regarding building a where query. I would like to pass both the column name and the value. I found this http://stackoverflow.com/questions/39734301/safely-pass-a-dynamic-column-name-into-an-activerecord-query-with-a-postgres-cas
[21:35:50] sunya7a: I'm wondering if there is a better solution and if the proposed one is good and safe to use
[21:47:23] sunya7a: Radar: I'm thinking along these lines: quoted_column = self.name.constantize.connection.quote_column_name(column_name)
[21:47:28] sunya7a: self.name.constantize.where("#{quoted_name} like ?", "%#{ query }%")
[21:48:09] sunya7a: Radar: my column name is passed and will be 'name' or 'description'
[21:48:58] sunya7a: I'm also sharing this method via a shared module...hence the self.name.constantize (not sure if this is good practice either)

2017-04-08

[15:50:59] sunya7a: how do i run a js.erb view file through coffeescript engine? when i try to rename to coffee.erb my controller doesn't render it during a js request
[15:55:18] sunya7a: i am looking for what coffeebeans does I think ... is this behavior built in now or is there an updated gem...coffeebeans seems stale
[16:03:05] sunya7a: matthewd: against using coffeescript for the response? is it just preference or technical reason?
[16:03:41] sunya7a: matthewd: ahh...i assumed it would be cached or pre-compiled in production
[16:04:39] sunya7a: u r right...ty
[21:49:27] sunya7a: i have a question regarding building a where query. I would like to pass both the column name and the value. I found this http://stackoverflow.com/questions/39734301/safely-pass-a-dynamic-column-name-into-an-activerecord-query-with-a-postgres-cas
[21:49:53] sunya7a: I'm wondering if there is a better solution and if the proposed one is good and safe to use

2017-04-07

[01:43:52] sunya7a: in my migration i have t.references :user, foreign_key: true. I want user_id to be unique. I tried adding unique: true to the end of that line but it does not create a unique index, and attempting to add a unique index fails saying there's already an index on user_id
[01:44:32] sunya7a: attempting to add a unique index *separately* in another migration fails...
[01:45:27] sunya7a: heya radar...it's always so weird to see your good mornings so late at night (for me)
[01:48:21] sunya7a: masterasia: i think it recreates fixtures at least.
[01:53:16] sunya7a: alright...so it seems it's a name collision. Since i used t.references :user, it created user_id column as foreign key with index...only it's not unique index and putting unique: true doesn't work. when I try to add the unique index separately i get the name collision. I want to customize name with name: 'my_unique_index' ... is there a common naming convention for this? naming things is hard =/
[01:55:04] sunya7a: sevenseacat: i know...what's a common name...i don't see any of my other index named with unique...in the schema it's always a separate thing like name: "index_organizations_on_name", unique: true
[01:56:23] sunya7a: sevenseacat: unless there's a way to define unique true during table creation...i tried this and it doesn't add the uniquness: t.references :user, foreign_key: true, unique: true
[01:56:28] sunya7a: sevenseacat: is that line incorrect?
[02:10:39] sunya7a: sevenseacat: ;; not liking that...i did and looking at the schema file i ended up with 2 indices defined...
[02:11:36] sunya7a: sevenseacat: one defined automatically because using references put foreign_key on user_id...and then another index on the same column for the uniqueness...i presume this is an unneccessary performance hit
[02:12:01] sunya7a: sevenseacat: better to leave uniqueness constraint in the model? what do you think
[02:13:42] sunya7a: sevenseacat: oh dropping the rails generated one is a nice idea...didn't think of that...ty
[02:19:32] sunya7a: sevenseacat: hah....can't drop it...: needed in a foreign key constraint
[02:20:06] sunya7a: sevenseacat: so drop fk constraint...drop index, make new one, and readd fk constraint?
[02:21:13] sunya7a: sevenseacat: in your test app was it defined as a fk?
[02:23:21] sunya7a: i think so...mysql might be stricter in this case
[02:23:54] sunya7a: it's ok...i think it's not worth the trouble. uniquness validation in model should be good...
[02:31:35] sunya7a: sevenseacat: =( did it anyway...i guess it's how i want it now...thanks for the help!

2017-04-06

[17:04:42] sunya7a: is it possible to use images or icons inside the input placeholder value?
[17:05:58] sunya7a: epochwolf: how would i do it with emoji? I'm trying to use the foundation icons...but something else would be ok...
[17:08:52] sunya7a: epochwolf: I tried entering the html code for it but it just displays the code...how would i tell the browser to convert the html code to the actual symbol?
[17:10:06] sunya7a: epochwolf: i think i got it
[17:10:14] sunya7a: placeholder=("&#128270;").html_safe

2017-04-05

[17:51:09] sunya7a: hi, I have a model Profile which I would like to update by calling profile.update(params). Profile belongs_to Organization and so there's profile.organization_id. I would like to overwrite when this gets set. I thought I would do this in model/profile.rb with def self.organization_id=() but it doesn't work
[19:23:07] sunya7a: cnk: hi, here are my controller and models https://gist.github.com/anonymous/796dd9fa42e8c5c7d33ec708cf400b5b
[19:25:23] sunya7a: cnk: i think it's because i'm writing it in a circular way....so on line 59 i should use something like self.update_column(:organization_id, id)?
[19:29:46] sunya7a: cnk: when i edit the user he can pick from a list of organizations. the list is loaded via ajax and updated when the user types. soemtimes there are no hits in which case the json returned puts a dummy variable with the query string embedded as <<<query>>>. I want to save that to the organizations table.
[19:31:22] sunya7a: cnk: stepping through the rails code for @profile.update(params) i see that it runs @profile.organization_id=() in attribute_assignment.rb
[19:31:27] sunya7a: cnk: correct!
[19:32:30] sunya7a: cnk: i think i solved it with update_column but it's not going through any callbacks it seems now
[19:41:39] sunya7a: cnk: yea...i looked...it's not supposed to run callbacks...so it makes sense
[19:41:47] sunya7a: cnk: how do i trigger callback manually?
[19:42:40] sunya7a: cnk: okay ty...i think this is working...not as pretty as i thought it would be
[19:44:07] sunya7a: cnk: enjoy...thanks for your help

2017-04-02

[20:42:33] sunya7a: Is there a way to distinguish between when a has_many is being deleted because we update the dependent model and when we delete it as a result of destroying the model on which it is dependent on and we set dependent: :destroy?
[20:43:17] sunya7a: So for xample...I have Project has many Tasks
[20:46:06] sunya7a: sorry...let's say I have Project has many Tags through project_tags...I want to make a distinction and run different code on project_tags when I remove a tag from a project, versus when I deleted a project and project_tags are removed as a result of Project has_many project_tags, dependent: :destroy

2017-04-01

[01:52:40] sunya7a: Is anyone available to help with a question regarding PaperTrail gem?
[19:23:13] sunya7a: what is the meaning of a method definition where the parameter is followed by a colon? for example def myMethod(param1:, param2:)

2017-03-31

[02:15:02] sunya7a: Hi, I have a problem with how has many through associations are updating each other, in particular the entries in the join model. controller and models: https://gist.github.com/anonymous/8d4438f455978991770cc3d4edc3837d. The before_destroy callback in the degreeholdership model is never called. I suspect it's because of how #update in the controller updates the join model entries (I stepped through the activemodel code and it leads to a call to
[02:17:22] sunya7a: pupsicle: Thank you for your reply earlier. My problem is with #update seemingly not running the callbacks for associated models. Do you know of another method that would do so?
[15:54:50] sunya7a: Hi all. I'm trying to create a new object (profile) which has a many through association. When I try to save the profile i get validation errors, because the association cannot link to the profile which does not yet have an ID
[15:54:55] sunya7a: how do i work around this?
[16:08:32] sunya7a: I found this which seems like this issue is automatically handled by activereocrd: http://stackoverflow.com/questions/18703036/when-will-activerecord-save-associations but it doesn't seem to be doing it in my case
[16:09:05] sunya7a: Here's code for referencee: https://gist.github.com/anonymous/796bc4b622bf54dff3be982962e3ef7b
[16:16:03] sunya7a: Andr3as: it should...what are you getting back?
[16:18:33] sunya7a: Andr3as: <% set_lockable_class %> should be <%= set_lockable_class %>
[16:18:50] sunya7a: Andr3as: otherwise it will just run the code and not print anything to your template
[16:19:13] sunya7a: Andr3as: okay...no worries...gl
[16:35:48] sunya7a: Hi again, I've found a workaround for my case, which is to set validate: false at has_many :degreeholderships. However based on http://guides.rubyonrails.org/association_basics.html#has-many-association-reference section 4.3.4 this seems unneccesary (unless I misunderstand)
[16:36:47] sunya7a: It says that if the parent object is unsaved (new_record?) then the child objects are not saved when added. all unsaved members of the association are automatically saved when parent object is saved.
[16:37:15] sunya7a: mustmodify: yes...you can use other serializers

2017-03-30

[15:16:48] sunya7a: What method to update params on my model do I use if i need things such as dependent destroy to trigger?
[15:32:02] sunya7a: mustmodify: sry if i wasn't clear. I should have started with this: does model.update trigger all callbacks that are associated with my model. I read that update_all will update the fields (columns in table) without instantiating the model so callbacks aren't triggered...does #update behave the same?

2017-03-29

[03:12:39] sunya7a: Radar: =) no worries...it was worth a shot. It does seem like my setup should be fairly common, so I think it's a simple mistake in my setup. Would you mind taking a quick look?
[03:15:49] sunya7a: Radar: thanks for the offer...I'll bang my head on it for a few more hours and will get back to you. Could you answer one thing though if you have a second. Is the expected behavior to to be able to restore entries in the join table or is it not meant to do that?
[03:16:29] sunya7a: also what time zone are you? so i know what saturday morning is for you
[03:21:52] sunya7a: Radar: no problem...i appreciate taking the time to reply

2017-03-28

[00:09:30] sunya7a: I'm getting a UnknownPrimaryKey error when attempting to update a join table. migration and models are in here: https://gist.github.com/anonymous/5ec0962aac9c7e20a77df7ea6f460433
[00:10:25] sunya7a: earlier I was using paranoia gem and placed acts_as_paranoid on the join table. after a discussion I realized I didn't need it and removed it and changed the migration to rmeove the deleted_at column, but now I get this error. Could someone explain why?
[00:11:26] sunya7a: acts_as_paranoid in the model for the join table*
[17:20:19] sunya7a: Hi. In my rails 5 app I'm attempting to restore a destroyed profile using recursive: true using paranoia gem. Here is my setup: https://gist.github.com/anonymous/fb677f31c4de618fa1bef2ce942af830. When restoring the profile, none of the associations are restored in the join table (which were correctly marked by active: NULL). Is there a mistake in my setup or is this a bug in the gem? I checked the issue tracker but don't see this common setup m
[17:21:14] sunya7a: matthewd: I thought about what you asked yesterday, and I believe this is the behavior I'm looking for. Only now the restore doesn't work for me. sorry for the wall of text
[18:43:51] sunya7a: I've submitted a bug report for the Paranoia gem: https://github.com/rubysherpas/paranoia/issues/394 . If anyone here could offer some insight to the issue it would be much appreciated. It might be as simple as an error in my setup or misunderstanding in how the gem works. shout out to radar who i believe is a contributor (beg)
[19:33:49] sunya7a: renegadeandy: can you try redirect_back instead of redirect_to :back
[19:35:25] sunya7a: renegadeandy: http://api.rubyonrails.org/classes/ActionController/Redirecting.html#method-i-redirect_back

2017-03-27

[19:48:57] sunya7a: Hi, I have the following model and controller code:https://gist.github.com/anonymous/1d90ae5cbfa1bbc76b8b4d466dc45dd8. When I update my profile and remove titles, the deleted_at is set properly on the join table. But when I re-add the title it creates a new record instead of removing the deleted_at value.
[19:49:26] sunya7a: I would also appreciate if anyone could voice opinions as to the current behavior is actually better in the long run
[20:55:46] sunya7a: matthewd: thank you. I gave it some more thought and I think I misunderstood some core concepts.

2017-03-23

[06:13:06] sunya7a: Ping timeout: 240 seconds
[21:20:26] sunya7a: has joined #RubyOnRails
[21:20:26] sunya7a: has joined #ruby

2017-03-19

[20:09:15] sunya7a: Ping timeout: 245 seconds
[20:09:49] sunya7a: has joined #RubyOnRails
[20:09:49] sunya7a: has joined #ruby

2016-06-19

[18:45:02] sunya7a: has joined #ruby
[18:45:03] sunya7a: has joined #RubyOnRails

2016-06-15

[23:13:00] sunya7a: *.net *.split

2016-05-17

[14:58:12] sunya7a: Ping timeout: 276 seconds
[14:58:34] sunya7a: has joined #RubyOnRails
[14:58:34] sunya7a: has joined #ruby

2016-04-19

[15:13:15] sunya7a: is it preferably to use .constantize or Object.send? I would like to hear pros and cons for each if possible...unless there's an obvious choice in RoR apps?
[15:13:57] sunya7a: sevenseacat: Trying to call method on a model that i put together from a string?
[15:14:21] sunya7a: tubbo: i seee...in my case I put together a string that ends up being a model name
[15:15:08] sunya7a: i was successful using both methods....but would like to hear opinions as to which one is better in practice?
[15:27:16] sunya7a: smathy: confusion on my part...i see what you mean....thank you

2016-03-03

[03:26:38] sunya7a: Ping timeout: 260 seconds
[03:40:21] sunya7a: has joined #RubyOnRails
[03:40:21] sunya7a: has joined #ruby

2016-02-27

[22:32:08] sunya7a: *.net *.split
[22:54:02] sunya7a: has joined #RubyOnRails
[22:54:02] sunya7a: has joined #ruby

2016-02-19

[18:25:35] sunya7a: *.net *.split
[18:25:53] sunya7a: has joined #RubyOnRails
[18:25:53] sunya7a: has joined #ruby

2016-02-15

[22:27:11] sunya7a: has joined #ruby
[22:27:12] sunya7a: has joined #RubyOnRails

2016-02-02

[19:12:05] sunya7a: *.net *.split

2016-01-31

[12:25:07] sunya7a: *.net *.split
[12:29:42] sunya7a: has joined #RubyOnRails
[12:29:45] sunya7a: has joined #ruby

2016-01-25

[17:29:29] sunya7a: Could someone have a look at this test on line 81 and tell me why it is failing. The error states that @wheel is nil. I don't understand why it's not seeing the instance variable that was created in the setup https://gist.github.com/anonymous/9435393b5b2e214d000c
[19:04:30] sunya7a: shevy: ty =)
[19:04:43] sunya7a: Could someone have a look at this test on line 81 and tell me why it is failing. The error states that @wheel is nil. I don't understand why it's not seeing the instance variable that was created in the setup https://gist.github.com/anonymous/5e3fe49c7a847540ac93
[19:05:28] sunya7a: it passes when I use DiameterDouble.new instead of @wheel on lines 85
[19:05:40] sunya7a: drbrain: ok
[19:08:27] sunya7a: With output: https://gist.github.com/anonymous/be022c47bec3174a9584
[19:13:45] sunya7a: drbrain: oh...i suppose so...although i wouldn't have thought of them as being "connected"?
[19:14:13] sunya7a: drbrain: so...renaming the first class might fix it? let me try
[19:14:33] sunya7a: drbrain: indeed
[19:16:42] sunya7a: drbrain: thank you...didn't see that at all!
[19:17:11] sunya7a: drbrain: is that when you used -w?
[19:17:21] sunya7a: drbrain: ah i see
[19:18:07] sunya7a: drbrain: so your thought process was to see if setup was called at all?
[19:18:50] sunya7a: drbrain: okay...i'll keep that in mind...thanks again...hope you collect royalties on that
[19:19:39] sunya7a: drbrain: it's hard for me to do that...double check things that I know to be true....or assumed to be true
[19:19:50] sunya7a: drbrain: tough habit to break
[19:20:53] sunya7a: drbrain: ahh...okay...that's what is happening...i'm not too familiar with those techniques....that is referred to as "monkey patching"?
[19:21:24] sunya7a: drbrain: fair enough
[19:21:36] sunya7a: drbrain: but that is how you would monkey patch core classes
[19:21:52] sunya7a: okay...i do know something
[19:22:04] sunya7a: i'll go and read that article =)
[19:28:44] sunya7a: drbrain: "select is broken" =)

2016-01-24

[18:28:15] sunya7a: Could someone have a look at this test on line 81 and tell me why it is failing. The error states that @wheel is nil. I don't understand what it's not seeing the instance variable that was created in the setup https://gist.github.com/anonymous/9435393b5b2e214d000c
[18:28:28] sunya7a: s/what/why

2016-01-22

[03:10:04] sunya7a: Radar: i see...found http://ruby-doc.org/core-2.2.0/Module.html#method-i-public i think i understand...thank you
[15:50:06] sunya7a: how do i grab data from the session object while setting a default value in case the key doesn't exist? I tried #fetch but it seems session doesn't respond to it...I'm on RoR 3.0.20
[15:52:52] sunya7a: Papierkorb: thank you.
[15:54:24] sunya7a: Papierkorb: do you know why #fetch doesn't work on session? i always thought it is a Hash
[15:57:26] sunya7a: Papierkorb: Okay...ill try to find the source code for it to see what exactly session is...thank you
[16:05:25] sunya7a: Papierkorb: ahh...turns out that it does respond to fetch...only fetch is not able to automatically convert a symbol into string...while session[:a] does. I guess that is added behavior by RoR to session
[16:06:07] sunya7a: Papierkorb: cool...thanks again for your time...that clears things up for me