Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1024029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:43:07+00:00 2026-05-16T11:43:07+00:00

Update : Gutted entire question with more thorough description Ok same question with different

  • 0

Update : Gutted entire question with more thorough description

Ok same question with different names.

In my model, I do validate the presence of.

class QuickFact < ActiveRecord::Base
 belongs_to :organization

 validates_presence_of :quick_fact, :content

But if either is blank, it errors out with :

Missing template organizations/_quick_fact_fields.erb

Here’s the catch. I have a nested form model with dynamically addable parts to it. As followed from here :

http://railscasts.com/episodes/197-nested-model-form-part-2

That is what generates and calls the _quick_fact_fields.erb . But that works perfectly and is located within quick_facts/_quick_fact_fields.html.haml

Update: My Controller Code

organizations_controller.rb

def update
  if @organization.update_attributes(params[:organization])
    ..
    elsif params[:organization][:quick_facts_attributes]
      flash[:notice] = 'QuickFacts successfully updated.'
      redirect_to organization_quick_facts_url(@organization)
    else
      flash[:notice] = 'Organization was successfully updated.'
      redirect_to :action => 'edit'
    end
  else
    # re-render last form
    ..
    elsif params[:organization][:quick_facts_attributes]
      render :template => "quick_facts/index"
    else
      render :action => 'edit'
    end
  end
end
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T11:43:08+00:00Added an answer on May 16, 2026 at 11:43 am

    Got it. I had two controllers.

    quick_facts_controller.rb, and organizations_controller.rb

    Once I deleted the update function in quick_facts_controller, it worked properly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Update : I found almost exact similar question , yet it has slightly different
UPDATE : I updated the classes to look more like my actual model. When
Update: giving a much more thorough example. The first two solutions offered were right
Update: gutted the question with a simpler example, that isn't answered by the originally
UPDATE: I've been playing around with this more, and it seems like tmux's clear-history
UPDATE: I've completely changed the question because in reality, I'm having a really hard
UPDATE This is an old question for an old version of Xcode. It turned
Update 2018 TL;DR; LaTEX for WPF https://github.com/ForNeVeR/wpf-math Original question I need to have a
UPDATE: I made a mistake in my debugging - this question is not relavent
Update: I am sorry i pasted in list.xml twice by mistake, my question is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.