Page 1 of 3 | Next »
[19:50:53] frankson: im trying to save a model, and associate a bunch of objects to it at the same time, but fields_for isn't producing the number of items i'm associating
[19:51:47] frankson: the models im trying to associate already exist in the database, but i think its not behaving the way I expect because the parent isn't saved yet
[20:01:14] frankson: i was looking at that though and it didn't jump out at me cuz that doesn't use f.fields_for
[22:09:29] frankson: i wanna bump one element of an activerecord collection to the beginning of the list, does anyone know the method i'm looking for
[22:13:45] frankson: mikecmpbll: so should i just remove the item i want to be first from the collection, display it first, and then display the rest?
[23:10:57] frankson: Doddlin: i thought the heroku cli tool automatically precompiles assets when you push an update
[05:45:26] frankson: and i can use click_link to get to other pages, with multiple assertions per scenario to verify i am indeed navigatin pages
[06:02:14] frankson: added the sessions controller, i'm probably not saving data in the session correctly
[06:05:17] frankson: i thought integration tests were supposed to be written from the user persective and i dont have access to the session
[06:28:21] frankson: actually, i guess i should only use visit once, as the only time the user would enter a url and not navigate through page interaction is on the initial visit to the site
[07:22:19] frankson: vedu: http://www.toptal.com/ruby-on-rails/elasticsearch-for-ruby-on-rails-an-introduction-to-chewy
[07:49:48] frankson: vedu: yea, between that article and the chewy docs i figured it out, tho mixing in some of the elasticsearch filters were less than obvious
[07:51:06] frankson: but setting up the search indexes and doing basic searches was actually pretty easy
[05:42:11] frankson: in there, where it's got the 'get :index' would be where a 'post :create' would be acceptable
[05:43:33] frankson: if you're just trying to use the factory, then in that same example, instead of Team.create you'd have create(:media_source)
[05:49:27] frankson: and in line with that, using model specs and integration tests is, from the perspective of some, the thing to do
[05:50:11] frankson: i.e. unit test the behaviour of your objects, and integration test the whole stack from the behaviour perspective
[05:55:26] frankson: i was all gung ho about testing my controller cuz that's the only thing about my app right now that I know exactly everything it's going to do
[05:56:38] frankson: so i wrote a nice test for it and was all proud of myself, but then i found this and my joyous feelings were crushed
[05:58:00] frankson: i'm definitely still figuring out what's worth testing, but the controller test i wrote is definitely testing my implementation, not necessarily it's behavior
[05:59:08] frankson: especially since controllers inherit from eachother and rails can still handle requests you don't have actions for
[17:44:54] frankson: acriax: why not? all you really need is to be able to do a post request to your devise sessions controller, and handle the cookie you get in the response no?
[17:54:40] frankson: you could find the account via username/password first, and then pass that result to sign_in if its not false
[00:22:46] frankson: renegadeandy: your error says something's nil that's not supposed to be, if you stick byebug in before line 15 and poke around with @user you might find what's nil thats not supposed to be
[23:44:48] frankson: Kendro: when you think of a feature you want to implement, first step is to google <feature> gem
[23:57:36] frankson: but if you have multiple projects that use different versions of the same gem, wont you still get explosions
[21:50:50] frankson: hey if cucumber can't access the sessions hash, how should I assert that my user has been logged in?
[09:30:51] frankson: what's the correct way to validate that an object has a minimum of one in a has_many association?
[05:45:50] frankson: floopie: i dont think the generator generates that file, but you can make it manually and it'll work the same
[05:46:35] frankson: floopie: actually, you should see what the UserMailer that was generated is inheriting from if anything
[05:48:05] frankson: yea now just make your usermailer inherit from applicationmailer instead of actionmailer base
[05:49:20] frankson: and your ApplicationMailer should inherit from ActionMailer::Base, so your UserMailer does too
[21:35:51] frankson: if you're using sqlite you might just need to save your array as a string and just reparse it when you pull it from the db again
[21:48:27] frankson: so if your ajax request returns true, your know your object is done or whatever on the db side
[21:54:24] frankson: you'll probably want that /status/:id path or whatever to only respond to ajax requests
[22:02:01] frankson: Limix: im definitely bad at testing, but wouldn't testing an api only app just make things easier?
[22:02:22] frankson: as in you don't need to worry about css selectors, you can just make sure the response returns the data you're api is supposed to?
[22:43:00] frankson: but the paid version is probably overkill for a real estate agent's personal site
[01:43:09] frankson: hey if i'm dealing with a polymorphic association through a nested route, is there an easy way to determine the type from the controller? or should I just pass the parent's type and id in hidden fields
[00:48:57] frankson: hey does anyone know a way to save a datetime object and preserve the timezone it was parsed in
[00:13:31] frankson: right, but what if i want to still know what TZ the data was originally entered in
[00:14:34] frankson: say a user enters "2015-03-09 7:00 PM EST", it parses and saves the correct time but tosses the EST and the offset out the window
[00:21:04] frankson: if you use the scaffold generator it includes a before_action that does a @resource.find(params[:id]
[22:32:48] frankson: anyone know a good way to get the timezone abbreviation from a datetime object?
[22:34:16] frankson: and parsing the datetime object as a time object applies to offset and then gives me UTC
[03:21:37] frankson: hey guys, trying to get a namespaced and nested dynamic segment to work, what's wrong with this gist? https://gist.github.com/sickslives/54f742f1c030d671c0c9
[03:27:03] frankson: when i check the controller_name and action_name it says 'courses' and 'show' the error is that there's no courses with id='analysis'
[03:40:46] frankson: updated my gist with rake routes results. the leading 'admin' after the to: in my route was incorrect but even corrected it still seems to be going to the show action
[03:46:59] frankson: yea ok so im dumb. i was swapping one route for the other instead of including them both
[22:04:00] frankson: gheegh: you don't need to rewrite your serverside to do js pagination though, you can just return whatever results you're returning for each page now as the js response
[22:06:16] frankson: so when someone clicks the 'next page' or adds a filter, it does an ajax request to your server instead of asking for a new page
[23:04:18] frankson: okay refining my question: is there a way to get a content_for block in a partial to yield in the layout? I've discovered i can yield to my view fine but due to the order in which stuff gets rendered
[08:46:24] frankson: pineappletree: i think you can handle CSV's pretty well with just straight ruby
[08:49:36] frankson: and then you might need to register it as a mime type but you can just format your response as a csv for exporting
[09:17:17] frankson: do you mean being able to type rails g migration user name:string email:string etc?
[09:19:26] frankson: it will tell you what all the method names are for the various routes you've defined