similar to: Help with this comparison and loop

Displaying 6 results from an estimated 6 matches similar to: "Help with this comparison and loop"

2006 Feb 21
7
Validation issues
I have a form. Everything submits into the database if I don''t have any validation rules. When I put these rules: validates_uniqueness_of :title, :message => "already exists in database" validates_presence_of :title I get this error (which seems weird because I am not validating against that): You have a nil object when you didn''t expect it! You
2006 Feb 13
0
(no subject)
Here is my db setup: focus id name sub_focus id focus_id name I have a select menu for focus and want to fill another select menu for sub_focus (with AJAX) depending on what the focus is can someone point me in the right direction? Thanks. Seth Buntin -------------- next part -------------- An HTML attachment was
2006 Feb 13
0
(no subject)
If you''ve not bought the Agile Web Development book or the new Rails Recipes book, you really should. A lot of the questions you''re asking are in there along with a lot of really important concepts. You need to look into observe_field which monitors a form field for changes and then updates an element (usually a div with an id) with the results from an AJAX call. Then you
2006 Mar 01
1
Accessing AJAX''ed elements via javascript
Is there a way to get access (via javascript) the page elements that were populated with AJAX (observe_field)? If you look at my source I have: <select name="resource[sub_focus_id]" id="resource_sub_focus_id"></select> But the actual select menu is filled with options because I used the observe_field to fill in the options. Now I want to be able to access
2006 Feb 21
4
Error, got String?
I am getting this error. ActiveRecord::AssociationTypeMismatch in Resources#create Focus expected, got String I have a select menu named resource[focus]. My focus (belongs_to :resources) table has a one-to-many relationship with the resources (has_one :focus) table (A resource will have only one focus but one focus will have many resources). I assume this error means that the focus is
2006 Feb 21
4
Select error
This code: <p> <label for="resource_type">Type</label><br/> <%= select(:resource, :type, %w{ Web Data }, { :include_blank => true }) %> </p> Produces this error: TypeError in Resources#new Showing app/views/resources/_form.rhtml where line #6 raised: wrong argument type String (expected Module) Extracted source (around line