search for: poll_options

Displaying 2 results from an estimated 2 matches for "poll_options".

2009 Jun 03
3
Appending a Rails Partial with jQuery
...my code in my application.js file vs a bunch of files all over my view folders. This is what i have in my application.js $(document).ready(function() { $(''#add_option'').click(function() { $(this).addPollOption(); }); }); jQuery.fn.addPollOption = function() { $("#poll_options").append(''#{escape_javascript render(:partial => "topics/poll_option", :object => TopicOption.new)}''); }; i have tried it with the #{} and the <%= %> both give the same result. Instead of getting the partial to populate the div, it simply adds the text...
2006 Feb 16
9
rake migrate HANGS
....up create_table polls do |table| table.column ''question'', :string table.column ''user_id'', :integer table.column ''start_time'', :datetime table.column ''end_time'', :datetime end create_table poll_options do |table| table.column ''poll_id'', :integer table.column ''option_text'', :string table.column ''option_order'', :integer end execute ''ALTER TABLE poll_options ADD CONSTRAINT fk_polls FOREIGN KEY ( poll_id ) REFE...