Created
July 2, 2013 01:52
-
-
Save jgautsch/5906232 to your computer and use it in GitHub Desktop.
JS being in my html from the db
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# THis is the controller action | |
def first_step | |
@payers = sorted_payers | |
end | |
private | |
def sorted_payers | |
@label1 = Payer.new(name: "<script>$( document ).ready(function() {alert( 'ready!' );});</script>") | |
end | |
# In first_step.html.erb | |
# NOTE: wmi_payer_id is a method on the Payer class that just returns the id | |
<%= select_tag "id_of_payer", options_from_collection_for_select(@payers, "wmi_payer_id", "name"), multiple: true, class: "span6" %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment