Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixing a regression

  • Loading branch information...
commit a9a130882a9345b887a9b5e85cb1a12be24bd111 1 parent 0274410
@Bringo Bringo authored
View
2  app/helpers/application_helper.rb
@@ -51,7 +51,7 @@ def maybe_pluralize(n, text)
# that is used for the language pickers in Instantiations and Asset Tracks.
#
def prepopulate_language_tokens_for(object)
- object.language_tokens.split(',').collect { |token| { :id => token, :name => ISO639::ISO639_CODES[token][:en] }.to_json }
+ object.language_tokens.split(',').collect { |token| { :id => token, :name => ISO639::ISO639_CODES[token][:en] } }.to_json
end
# Formtastic has_many form helpers
View
2  app/views/instantiations/_form.html.erb
@@ -61,7 +61,7 @@
<%= form.input :format_tracks, :as => :string, :label => "Tracks", :required => false %>
<%= form.input :format_channel_configuration, :as => :string, :label => "Channel Configuration", :required => false %>
<%= form.input :language_tokens, :label => "Languages",
- :input_html => { "data-pre" => prepopulate_language_tokens_for(@instantiation) },
+ :input_html => { "data-pre" => prepopulate_language_tokens_for(form.object) },
:required => false %>
<%= form.input :alternative_modes, :as => :string, :required => false %>
<% end %>
Please sign in to comment.
Something went wrong with that request. Please try again.