Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

inverse of in rails

irb> p = Project.new
=> #<Project id: nil, name: nil, ...>
irb> t = p.tasks.build
=> #<Task id: nil, project_id: nil, ...>
irb> t.project
=> #<Project id: nil, name: nil, ...>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #inverse #rails
ADD COMMENT
Topic
Name
8+7 =