search for: campus_params

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

2013 Dec 10
2
form_tag + fields_for Rails 4
...t; > <input type=''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! > ......