As far as I know, models aren't associated with a controller.  So you 
could just 'rails generate model ModelName field:type' three times for 
the Post, Catalog, and Tag models.  Then in some controller, you can 
write:

class PostsController < ApplicationController
  def new
    @title = "Some page"
    @val = 10

    @post = Post.new
    @post.email = "x...@yahoo.com"

    @catalog = Catalog.new
    @catalog.name = "Pottery Barn"

    @tag = Tag.new
    @tag.name = "dishes"
  end

end

And then in new.html.erb, you can write:

<h1>Posts#new</h1>

<div>Post model: <%= @post.email %></div>
<div>Catalog model: <%= @catalog.name %></div>
<div>Tag model: <%= @tag.name %></div>
<div>Val: <%= @val %></div>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to