angular_select

This commit is contained in:
Rohan Mitchell
2012-11-22 11:27:51 +11:00
parent ad76e66944
commit e64a86f5be
2 changed files with 3 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ class AngularFormBuilder < ActionView::Helpers::FormBuilder
@template.text_field_tag name, value, :id => id
end
def angular_select(method, choices, options = {}, html_options = {})
# ...
def angular_select(method, choices, angular_field, options = {}, html_options = {})
@template.select_tag method, @template.angular_options_for_select(choices, angular_field)
end
end

View File

@@ -21,7 +21,7 @@
= enterprise_fee_set_form.angular_fields_for :collection do |f|
%tr{'ng-repeat' => 'enterprise_fee in enterprise_fees'}
%td=# f.collection_select :enterprise_id, Enterprise.all, :id, :name, :include_blank => true
%td=# f.angular_select :fee_type, enterprise_fee_options
%td= f.angular_select :fee_type, enterprise_fee_type_options, 'enterprise_fee.fee_type'
%td= f.angular_text_field :name
%td=# f.collection_select :calculator_type, @calculators, :name, :description, {}, {:class => 'calculator_type'}