Björn Steneram


160 Experience
0 Lessons Completed
0 Questions Solved


Have you had the issue where the pay button doesn't respond until you either have reloaded the page or clicked it 2 or 3 times?

I'm getting a 400 Bad request in the javascript console

I added form tags for the fields like this: "<%= text_field_tag :address1, current_user.address1, :class => "form-control" %> but i still get the "You must supply either a card, customer, or bank account to create a token." when i try to post the form.. and i'm not getting much in the console so i don't know what is breaking :)

Thx :)

So like <%= user.something %> as name of the field?

So i need to name it with that ever the field it is under the user model? and then put what params in the controller to permitting,

Hello Chris! Thx for a great episode! So i noticed in this video that you updated some field on the current user to save the last 4 etc on the card. I was thinking that i could use that function to update other fields for the user as they subscribe to my service. I use pundit to setup a role based access to my app and i was successful in changing the role from demo to premium at the same time as they added a card and subscribe to my services but when i also try to update other fields it fails.. could the reason it fails be because of the way the form is built?

Posted in Subscriptions with Stripe Discussion

Yeah i did that and that works great :) Thx for your suggestion!

Posted in Subscriptions with Stripe Discussion

So i have been following along with this screencast and i got it all to work :) I even added a select box so could choose what plan i wanted to use. However i would like to have multiple boxes each for a certain plan. What would you recommend.. checkboxes in the form of buttons.. or something else? I don't think a dropdown select box is very selling.. I would like to have 3 or 4 boxes next to each other with different length of the subscription like 1 months and 3 months and so on..

Posted in Using Webhooks with Stripe Discussion

Hi Chris!

Another great episode about something i was just gonna start working with! I have a question about webhooks from Stripe. Is it possible to use webhooks to get update of the status of the subscription? If it's active or not, so that if someone isn't paying our a charge fails that it will update the user's account.

Again thx for a great episode!

Posted in video about sortable lists

Anyone know about a good gem for listing stuff in a nice way? I've been looking at at gem called SmartListing( but looking for a few alternatives.

Posted in API Tokens with Devise Token Authenticatable Discussion

Thanks for a great article! I've been looking for something like this for a while. Something i would love if someone could cover is also how to use my Rails app as a backend for my mobile app. This would go a long way of course but how do you login via a Rails api the first time when you might not have this token saved? this is a question i have been looking for an answer to for a while.

Great! Thx for quick reply!

Can you use httparty with web services that has a XML output ?

Posted in Forum Series Part 1: Architecture Discussion

Would it be possible to add categories to this? With like forum_thread belongs to categories and categories has many forum _threads?

Posted in Forum Series Part 1: Architecture Discussion

I'm going to have a hard time waiting for the next part of this series :) Great screencast!