I am not sure if you are just summarizing your day or asking for specific help.
If you want help to diagnose the issue, it would probably be a good idea to publish the code on Github. This way, someone could take a peak and provide some more relevant help.
Reading over your post, it sounds like your user is instance is not defined.
Also, I would watch out for code patterns like this:
With this write up, I think I was summarizing my day, but also was seeking help. However, I don't think I gave enough for others to diagnose the issue and help me out. Will definitely use Github next time around.
Cheers
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I am not sure if you are just summarizing your day or asking for specific help.
If you want help to diagnose the issue, it would probably be a good idea to publish the code on Github. This way, someone could take a peak and provide some more relevant help.
Reading over your post, it sounds like your user is instance is not defined.
Also, I would watch out for code patterns like this:
<%= f.hidden_field :username, :value => @user.username %>
In theory, anyone viewing this could change the username to a different value.
Something like this:
post = Post.new(post_params)
post.username = @user.username
if post.save
Should meet your goals and protect you long term.
-Scott
Thanks, Scott for the tips. :)
With this write up, I think I was summarizing my day, but also was seeking help. However, I don't think I gave enough for others to diagnose the issue and help me out. Will definitely use Github next time around.
Cheers