Skip to main content
Devise: current_user not saving to @forum_post.user
It sounds like your `` isn't working. Your forum_post must not have had it's user_id set in the database. It looks like your controller is setting it properly, but you should c...
Chris Oliver replied

Updating forum thread creates new post...
Forum Thread Controller class ForumThreadsController < ApplicationController before_action :authenticate_user!, except: [:index, :show] before_action :set_forum_thread, except: [:index,...
Erick Sitter posted

How would i go with making an inventory for products?
Spree is one approach if you want to use something premade. As far as keeping inventory of things like shirts, you can probably do two separate things: 1. You keep track of new additions to o...
Chris Oliver replied

No action "edit" in forum_posts_controller
Forum_Posts Controller class ForumThreads::ForumPostsController < ApplicationController before_action :authenticate_user! before_action :set_forum_thread def create @forum_post ...
Erick Sitter posted

undefined method username after update
Forum_threads Controller class ForumThreadsController < ApplicationController require 'forum_controller' before_action :authenticate_user!, except: [:index, :show] before_action :set...
Erick Sitter posted

How do I implement Facades Pattern on a already advanced Ruby on Rails project?
Since this pattern is simply and helpful but "doesn't really improve your code...", what would you recommend instead? Thanks a lot!
Andres Max replied

Forum_posts edit coming up as nil
Thanks, got it! But had to move it to edit.
Erick Sitter replied

Number of posts on index / Posts pagination
Got it correctly working by @forum_posts = @forum_thread.forum_posts.paginate But all the replies/posts are still showing and not limiting to 3 per page...
Erick Sitter replied

Forcing a file to download instead of displaying in the browser
Oh that's a super simple solution for paperclip. I love it!
Chris Oliver replied

Backend and Frontend co-operation
That's a really great question. Personally, I like to either record example urls and JSON that the frontend devs can work with or I'll give them example code that works already that they can modify...
Chris Oliver replied

Facets with Searchkick
@Caio. Your code just helped me out too. Thanks,
Simon Cooper replied

Orders and Order Items
Exactly what I was looking for! Thank you so much Chris!
Michael Victor replied

Subdomains Email reset with Devise
You'll want to probably use an if statement there to send it without the subdomain option. I know you can include helpers into the mailers so that could be a nice place to put the logic for the sub...
Chris Oliver replied

How about an episode on zero-downtime deployment?
I saw that recently and haven't had a chance to use it yet, but it seems like a wonderful option. I think that'll be the way to go especially if it's a seamless experience. The one question I have ...
Chris Oliver replied

Activity Feed with Public Activity Gem ?
I can! In the meantime, check out Ryan Bates' episode on it: A little old, but the gem hasn't changed much.
Chris Oliver replied

How do I connect multiple devise apps for a single login to any of the apps?
Does anyone know if the solution proposed by Thomas Bush works with rails 5 or is the code to change much? Thank you I've find the gem 'doorkeeper'!
Marco Beffa replied

how to create and use different sub models of base data model
This a good question and is semi-complex so there are a ton of different approaches to it. One of the ideas that's related to this (which isn't necessarily the right way to go) is Single Table I...
Chris Oliver replied

Firefox rendering issues
Hmm, you're right. I would check a couple things: 1. Make sure you're including any of the browser specific tags that you might be using for newer css styles. Make sure you include any of the `-...
Chris Oliver replied

Subscribe to the newsletter

Join 31,353+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.