Ariff Munshi


11,280 Experience
99 Lessons Completed
1 Question Solved


Thanks Chris!

thanks for the reply Chris Oliver!

Most of the examples I saw were using has_many relationships so I guessed I missed it.

There are examples tho that I've seen in strong params:

def forum_thread_params
params.require(:forum_thread).permit(:subject, forum_posts_attributes: [:id, :body])

is including the :id necessary?

I have tried this but seem to have a problem.

When I do:

def new
@post =

I get a undefined method 'build' for nil:class

but it will work if I do this:

def new
@post =

My models:

has_one: :content, dependent: :destroy
accepts_nested_attributes_for :content

belongs_to :post

Any ideas why?

Posted in File Uploads with Refile Discussion

Thanks Chris! Look forward to using it!

Posted in File Uploads with Refile Discussion

Great video! Still deciding between carrierwave and refile tho since it's still new and carrierwave's wiki is filled with howtos. Btw, I think you missed out on the uploading via url part. :)

logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.