In config/routes.rb: resources :posts do resources :comments end resources :pictures do resources :comments
Say I have a child model with two parent models: Event has_many tickets Person has_many tickets Ticket belongs_to Event
I have been beating my head against a wall with a particular use case for nested forms (I\'m using Rails 2.3.5).
I\'m a newbie Rails developer who is getting the following error when trying to access the \'new\' action on my CityController:
What is your solution to the problem if you have a model that is both not-nested and nested, such as products:
I have two models: class Solution < ActiveRecord::Base belongs_to :owner, :class_name => \"User\", :foreign_key => :user开发者_JAVA百科_id
I have some standard nested routes in my app, and I want to implement subdomains using the subdomain-fu gem.So I\'m currently doing this:
Imagine you have two defined routes: map.resources articles map.resources categories, :has_many => :articles