i hav tried this thng.....but it s coming to the else part.
class Article < ActiveRecord::Base belongs_to :category end
class Category < ActiveRecord::Base has_one :article end
def update @article = Category.new @article.uploaded_data = (params[:article]) @article.article = Article.find(params[:id]) @article.article.tag_list = (params[:tag_list]) if @article.update_attributes(params[:article]) redirect_to :action => 'show', :id => @article else @categories = Category.find(:all) render :action => 'edit'
end