Closed GoogleCodeExporter closed 9 years ago
In a nested scaffold, you can get the parent id in active_scaffold_constraints.
If
your association in subtest is named parent, you have to use
active_scaffold_constraints[:parent].
If you can go to subtests controller without nesting, you should use something
like
this:
def create_authorized?
if active_scaffold_constraints[:parent]
current_user == Test.find(active_scaffold_constraints[:parent]).owner
else
super
end
end
For questions what aren't bugs or feature requests is better to use the google
group.
Original comment by sergio.c...@gmail.com
on 2 Jun 2010 at 7:30
Original issue reported on code.google.com by
VoronkovAA@gmail.com
on 2 Jun 2010 at 2:29