README.md in token_field-0.0.3 vs README.md in token_field-1.0.0
- old
+ new
@@ -79,9 +79,15 @@
<%= form_for @category do |f| %>
<%= f.token_field :parent_id, :model => :category, :token_url => token_categories_path %>
<% end %>
+in case model is in namespace for example MyApp you should use :model like this
+
+ <%= form_for @category do |f| %>
+ <%= f.token_field :parent_id, :model => "MyApp::Category", :token_url => token_categories_path %>
+ <% end %>
+
if there would be model Parent, we can omit :model parameter.
for example in Product model like this
class Product < ActiveRecord::Base
belongs_to :category
\ No newline at end of file