Skip to content

Instantly share code, notes, and snippets.

@d3chapma
Created July 13, 2011 21:03
Show Gist options
  • Save d3chapma/1081325 to your computer and use it in GitHub Desktop.
Save d3chapma/1081325 to your computer and use it in GitHub Desktop.
= semantic_form_for [@goal, @step], :url => goal_step_path(@goal, @step) do |f|
= f.inputs :id => "step_#{@step.id}_description", :class => "description" do
= f.input :description, :input_html => { :autofocus => "autofocus"}
= f.inputs :date_due, :as => :string, :for => :due_date, :input_html => { :class => "datepicker"}, :label => "Due Date"
= f.buttons do
= f.commit_button
or
= link_to "Cancel", "#goal_#{@goal.id}", :class => "step_edit_cancel"
class DueDate < ActiveRecord::Base
belongs_to :step
end
ActiveRecord::StatementInvalid in Steps#edit
Showing /Users/dc/launchtools/app/views/steps/_form.html.haml where line #4 raised:
SQLite3::SQLException: no such column: due_dates.one_time_id: SELECT "due_dates".* FROM "due_dates" WHERE ("due_dates".one_time_id = 121) LIMIT 1
Extracted source (around line #4):
class OneTime < Step
has_one :due_date
accepts_nested_attributes_for :due_date
end
class Step < ActiveRecord::Base
belongs_to :goal
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment