search for: church_id

Displaying 1 result from an estimated 1 matches for "church_id".

2013 Dec 10
2
form_tag + fields_for Rails 4
...;'submit'' value=''Save'' > > <% end %> my controller > class CampusesController < ApplicationController > def new > @campus = Campus.new > end > > def create > @campus = Campus.new(campus_params) > @campus.church_id = session[:church_id] > # i''m just trying this way, because it''s not creating automatic > (accepts_nested_attributes_for) > * @campus.addresses.new(params[:addresses]) # the error line* > > if @campus.save! > ... > else >...