Created
February 15, 2013 21:15
-
-
Save abrambailey/4963601 to your computer and use it in GitHub Desktop.
This file contains 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
<% provide :title, 'Consumer Profile | Update' %> | |
<legend>Update your Profile</legend> | |
<%= simple_form_for @consumer, :html => { :class => 'cons_edit form-horizontal' } do |f| %> | |
<%= f.input :display_name, :label => "Public name", :placeholder => @consumer.user.username %> | |
<%= f.input :tagline, :placeholder => "Your tagline" %> | |
<%= f.input :tag_list, :label=>"Activities", :input_html => { :multiple => true } %> | |
<%= f.input :desc, :as=> "text", :label => "Description", :placeholder => "Describe yourself" %> | |
<div class="controls"> | |
<%= f.button :submit, "Update Profile" %> | |
</div> | |
<% end %> | |
<% @tags = [] %> | |
<% ActsAsTaggableOn::Tag.all.each do |tag| %> | |
<% @tags << tag.name %> | |
<% end %> | |
<script> | |
$(document).ready( function () { | |
$("#consumer_tag_list").select2({tags:[ | |
<% @tags.each do |tag| %> | |
<% if tag.equal? @tags.last %> | |
<%= "'#{tag}'".html_safe %> | |
<% else %> | |
<%= "'#{tag}',".html_safe %> | |
<% end %> | |
<% end %> | |
]}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment