Activity
Posted in Paypal & Stripe
Hi Chris - I just finished your Stripe course, which works great, but my client also wants the PayPal option. I am just wondering if you could share some insight on how you did it on your site?
Also, it would be great if you could update your Stripe course to include the pay now buttton integration. https://stripe-payments-demo.appspot.com/
Thank you,
Brian
Posted in Stripe Elements Javascript Discussion
Thanks René, I should of figured that out.
Posted in Stripe Elements Javascript Discussion
Hi Chris - The Bootstrap 4 Gem, specifically @import "bootstrap/forms"; blocks the Stripe card element from dispalying.
Do you know of a work around?
Thanks,
Brian
Posted in Payments with Stripe Master Class
Hi Chris - Quick update, I am just getting back to this course and I've updated my Rails app to 5.2.
I am on the "New Stripe Elements Video" and trying to call my credentials from the application file.
Therefore, I am just wondering how to correctly call my credentials from config/credentials.yml.enc. Currently I have:
<%= tag :meta, name: "stripe_key", content: Rails.application.credentials.development[:stripe_publishable_key] %>
This is working but should I do an if else statement for production vs development?
This is the content of the my credentials file:
development:
stripe_publishible_key:
stripe_secret_key:
production:
stripe_publishible_key:
stripe_secret_key:
Posted in Payments with Stripe Master Class
Thanks for the quick response Chris. I will defintely let you know if I have have any follow up questions.
On an unrelated note, I am using the Windows Subsystem for Linux with PostgreSQL installed on the Windows side. This means I can't access the Heroku database by running heroku psql in bash. Do you know of any work around for this?
The local psql command could not be located. For help installing psql, see https://devcenter.heroku.com/articles/heroku-postgresql#local-setup
Thanks,
Brian
Posted in Payments with Stripe Master Class
Hey Chris - I signed up for your payments with Stripe course and "Creating The Checkout Form With Stripe.js" section is really confusing. Basically video three on the New Stripe JS element does everything the followng three videos do, but the codiing is a little different?
Can I just use the content from video three?
Brian
Good suggestion on the gem. It worked well, but it is highlighting both my home and about page at the same time: https://mirrorcommunications.herokuapp.com/
Home and about are both show pages from my pages controller. I think this might be the reason, but I am not sure.
Any help would be awesome! This what I have:
<%= active_link_to "Home", root_path, :active => :exclusive %>
<%= active_link_to "About", pages_path, :action => "show", :id => 'about', :active => :exact %>
Yes, I have two different header styles and I can get menu highlighting on one but not both. There seems to be a lot of different options out there: http://stackoverflow.com/questions/3705898/best-way-to-add-current-class-to-nav-in-rails-3
Brian
Hi Chris - I tried that and nothing happens for me unfortunately? It just stays on the same post, even if I search for a different post. In addition, I am currently using ransack search in my header, and I am receiving errors on my other controllers, such as: undefined method `title_or_body_cont' for #Ransack::Search:0x007f9da497a2b8.
Just wondering how I get around this. Should I add ransack to my application controller?
Also on a secondary note, if you could do a video on setting up active menu classes that would be awesome, I can't find a good solution!
Brian
Just a quick follow up. How would I add searching for my posts show action?
I have a search form in my side bar on individual posts.
def show
end
Thanks,
Brian
Thanks Chris, I will try it out.
Brian
I am new to rails so this might be an easy question. I am trying to figure out the best way to add ransack to my posts index action.
Ransack
@q = Post.ransack(params[:q])
@posts = @q.result(distinct: true)
Current Controller:
def index
if params[:category].blank?
@posts=Post.all.order("created_at desc").paginate(:page => params[:page], per_page: 15)
else
@category_id = Category.find_by(name: params[:category]).id
@posts = Post.where(category_id: @category_id).order("created_at DESC").paginate(:page => params[:page], per_page: 5)
end