Activity
great episode glad you made it!
Posted in File Uploads with Refile Discussion
If anyone runs into dependency issues with Rails 5 I found a good solution here: https://github.com/refile/r...
Posted in Using Webhooks with Stripe Discussion
Thanks yeah I did figure it out and that was my issue!! Thanks:)
Hey Chris, I've been having trouble with turbo links. I'm not planning to upgrade my turbolinks and I have the jquery.turbolinks gem installed. The problem is that on first load my subscriptions_new submit button won't fire. It fires once I reload the page and everything works fine then. Any suggestions?
Posted in Using Webhooks with Stripe Discussion
Hey @excid3:disqus when I'm at minute 21 ish where you call event.data.object I don't see "source". I believe I have a bug but am not getting any errors. Aditionally, the object is saving all of the data as nill (EX: card_brand: nil, card_exp_month: nil).
Here's a screen shot of what I get when I call event.data.object and another screen shot of what happens when I call RecordCharges.new.call(event).
Any suggestions?
Just in case anyone else runs into the Turbolinks issue where your jQuery/JS doesn't work unless you refresh, the last answer here worked for me:)
Posted in Advanced Search, Autocomplete and Suggestions with ElasticSearch and the Searchkick gem Discussion
Is anyone else having this problem? http://stackoverflow.com/qu...
I've been trying to install elastic search but ran into some issues with homebrew and java. I recently upgraded to Yosemti and it seems to be the issue. Anyone know of a fix
Posted in Sending emails with Mandrill Discussion
Ok thanks! I'll check it out after lunch. I appreciate the guidance
Posted in Sending emails with Mandrill Discussion
I have a 10 day e-mail drip campaign set up in MailChimp. What's the best way to have new signups be automatically added to the list for this campagin? From what I'm reading it looks like you have to code the logic for automatic e-mails your self instead of just using mailchimp.. is this correct?
Hey Chris, i'm setting up this feature for my app now. I've used the commentable episode to help me structure the app so that users can create a category and then add a startup(s) to that category. Essentially, startups in my app are startupables I'd like to be able to upload a csv of startups for a particular category. Any ideas?
Posted in Authorization with Pundit Discussion
ok I got it... I was calling the class in the view instead of the actual instance... now I get it! learned something new. Thanks @excid3:disqus
Posted in Authorization with Pundit Discussion
category is a class of the model (I think:). I've not had this issue before. Should be pretty straight forward.
When I write category.inspect this is the output. (this is for the first category.)
"#<category id:="" 5,="" name:="" \"discovery="" tools\",="" created_at:="" \"2015-09-01="" 17:41:24\",="" updated_at:="" \"2015-09-01="" 17:41:24\",="" user_id:="" 1="">"
Posted in Authorization with Pundit Discussion
Yeah I've been playing with it for awhile. My models look correct, user has_many categories and category belongs_to user but I'm still nt able to call category.user. I went in rails console and the associations are working.
Posted in Authorization with Pundit Discussion
Hey @excid3:disqus I'm getting a strange error towards the end of the video where we add user == post.user I don't understand why this is happening because I have Devise setup properly. Any suggestions?
Posted in Ransack Scoping issues
I got a no method error for pins_path in schools#show. So I changed the global search variable that's set in my application controller From
def set_global_search_variable
@q = Pin.search(params[:q])
end
To:
def set_global_search_variable
@q = School.search(params[:q])
end
the error goes away. When I search I now get a new error.
No route matches [GET] "/schools"
I don't think the answer is to change Pin to School. I tried School.pins.search but that's a no method error for pins in school#show. Added @pins =Pin.all to the show method and that's also not working. Started running around in circles with this so asking for a little more help. I think I'm close. Really appreciate your help
Posted in Ransack Scoping issues
Thanks this is super helpful! I think I understand now from watching the video. I'll need to move my schools_controller.rb file and my pins controller.rb file into the app/controllers/schools folder. I'll also need to move my pins views folder into the view/schools folder. Is that right? I'll give it a shot today and let you know if it works.
Thanks again! really learning a ton.
Posted in Ransack Scoping issues
So I added my routes.rb and rake routes output here. http://stackoverflow.com/questions/30578520/limiting-search-results-to-associated-model-with-ransack-gem
Rake routes is a bit tough because it's so long but I thought I'd just add the routes for pins and schools. Is that enough?
Posted in Ransack Scoping issues
So I added all of the above. But I don't have a schools folder in my controller folder.
app/controllers/pins_controller.rb is where I put the code. When I run the search I get this error.
Routing Error
uninitialized constant PinsController::Schools
That's pretty clear where the error is. I tried creating a schools file and a second pins_controller.rb file with just the code in that but it didn't work. Instead of an error it just keeps redirecting to school/school_id
Edit: I did check the routes and they are working correctly /schools/:school_id/pins
Posted in Ransack Scoping issues
Thanks! This is really cool. I appreciate the help. Testing it now.
I'll let you know if it works.
Posted in Ransack Scoping issues
I'm just trying to allow an admin user to search for a list of pins created by a user from their school by the user's name. I don't want them to be able to find pins of other users as it's sensitive data. It seems like your first idea would be better but I'm not entirely sure. How would I grab the id from the url ? In the routes file?