Forum: Ruby on Rails how to enter and update difeerent tables data from views ?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E38118c6d20b4544e424fd700571e090?d=identicon&s=25 srikanth (Guest)
on 2008-12-16 08:10
(Received via mailing list)
hi ,

i have two tables called streams and tags.
using tags table i am assigning tags to the stream table entries using
acts_as_taggable plugin.
Now problem is if i try to  enter the data for tag table in
new.html.erb file from views/streams getting error like

Couldn't find Stream without an ID problem

i have  tried to enter data in new.html.erb file like:
      <p>
       <b>Tags</b><br />
       <%= f.text_area('tags_as_text') %>
       </p>

instead if i use below code in views:

<p>
       <b>Tags</b><br />
       <%= text_field_tag 'tag_list', @stream.tags.collect { |tag|
tag.name.include?(" ") ? '"' +"#{tag.name}" + '"' :  tag.name }.join("
")%>
     </p>

i am able to enter data but it is not reflecting in tag table and not
showing if i do the show option provided .

how to solve this problem?

thanks for any help or suggestions?

regards
Srikanth
This topic is locked and can not be replied to.