Multi parent child class (rails) -


i have planningclass in app. class can belong 3 different classes (system, subsystem or subsubsystem) depending on users will. more clear: user must able create planning 1 of 3 classes.

i'm having no trouble models, in plannings_controller#new, don't know do.

this new method if mother-class system:

@system = system.find(params[:system_id]) @planning = @system.plannings.build  respond_to |format|   format.html # new.html.erb   format.json { render json: @planning } end 

end

can tell me way of managing plannings controller know class mother-class?

thanks lot!

if

multi parent child class

you referring multiple inheritance, know there no such thing in ruby.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -