Ruby on Rails Thursday, July 29, 2010

Why am I encountering this situation?

I'm using the following code in my article form:

<% form_for [:admin, @article] do |f| %>

<%= f.error_messages %>

<p>
<%= f.label "Tags" %><br />
<%= select_tag "tags", "<option>Value 1</option><option>Value
2</option><option>Value 3</option><option>Value 4</option><option>Value
5</option><option>Value 6</option>" %>
</p>

<p><%= f.submit "Submit" %></p>

<% end %>

When I raise raise params[:tags].to_yaml in my controller's update
action, it prints the name of the tag.

For what reason would this value not be saved into the database?

I'm using acts_as_taggable_on :tags in my Article model.
--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment