Displaying 1 result from an estimated 1 matches for "styles_path".
Did you mean:
stylepath
2012 Apr 09
0
Autocomplete text-field version of dynamic select menu?
...utocomplete_source:
brands_path}, :class => ''text_field'' %>
</div>
</div>
<div class="form-actions">
<%= f.submit nil, :class => ''btn btn-primary'' %>
<%= link_to ''Cancel'', styles_path, :class => ''btn'' %>
</div>
</fieldset>
<% end %>
and in styles.rb (model):
belongs_to :brand
def brand_name
brand.try(:name)
end
def brand_name=(name)
self.brand = Brand.find_or_create_by_name(name) if name.present?
end
and in...