Not entirely sure this is Rails4 related but it used to work until very recently.
content_views_controller.rb
def create
@view = ContentView.create!(view_params) do |view|
view.organization = @organization
view.label ||= labelize_params(params[:content_view])
end
respond :resource => @view
end
content_view_repository.rb
def content_view_composite
if content_view.composite? <---- content_view is nil
errors.add(:base, _("Cannot add repositories to a composite content view"))
end
end
I recall seeing somewhere (a PR?) that the model needed to be "touched"? Could that be the case here, that the CV model doesn't exist yet when the content_view_repository model is being validated?
http://projects.theforeman.org/issues/13021