search for: school_nam

Displaying 4 results from an estimated 4 matches for "school_nam".

Did you mean: school_name
2006 Jun 03
8
confused about ActiveRecord relationships
I am very confused about where to put the belongs_to and the has_one (and other relationship identifiers). I have read the RDoc and the agile book many times about this and I think i still see it backwards. Let me outline my app so you have an understanding... I have 2 tables: Schools { id, school_name, address_id } and Addresses { street1, street2, city, state, zip, country } *** this is the way that makes sense to me but it doesnt work ****** Models school.rb has_one :address address.rb belongs_to :school View for School <% for school in @schools %> <td><%= scho...
2008 Apr 10
3
Custom Form Builder Help
...I wanted to use facebooker''s typeahead widget in side the other form builder. I don''t know much about form builders, but I created a file in lib/ doing this: http://pastie.caboo.se/178776 It works great, except that the id''s and class names get messed up. Instead of school_name, I get nilClass_name. The other methods work fine however. Here''s the form: <h1>New School</h1> <%= show_flash %> <% af_form_for :school, :url => schools_path, :html => {:method => :post } do |f| %> <%= f.typeahead :name, @schools, "name",...
2006 Feb 08
1
Weird validation issue
...oking.camp.camptype == Camptype.find(:first, :conditions => [ ''name = ?'', "Children''s Camp"]) or c.booking.camp.camptype == Camptype.find(:first, :conditions => [ ''name = ?'', ''Adventure Camp'']) ) } validates_presence_of :school_name, :if => Proc.new { |c| !c.booking.nil? and ( c.booking.camp.camptype == Camptype.find(:first, :conditions => [ ''name = ?'', "Children''s Camp"]) or c.booking.camp.camptype == Camptype.find(:first, :conditions => [ ''name = ?'', ''...
2006 Jul 27
0
Using CRUD + non-standard URLs
...w and have Symply RESTful handle /school/create Here''s the form code: <% form_for :school, @school do |f| %> <%= f.text_field :name %> <% end %> And here''s the output: <form action="/school/new" method="post"> <input id="school_name" name="school[name]" size="30" type="text" value="" /> </form> Isn''t the action supposed to be /school/create ? Do I have to specify it manually? And another question, does the restful plugin handle creation automatically or I hav...