Skip to content

Instantly share code, notes, and snippets.

@tjh
Forked from davidray/what_i_have.html.haml
Created January 18, 2010 16:41
Show Gist options
  • Save tjh/280157 to your computer and use it in GitHub Desktop.
Save tjh/280157 to your computer and use it in GitHub Desktop.
- f.fields_for :user_achievements do |child_form|
- if child_form.object.user == @user #This is stupid and dangerous
= blah blah blah
# The user has a "has_one" or "has_many" on the achievements, yea? Have you looked at tackling it this way?
- f.fields_for :user_achievements, @current_user.achievement do |child_form|
= blah blah blah
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment