Displaying 2 results from an estimated 2 matches for "cur_user".
Did you mean:
our_user
2010 Apr 02
6
App_Controller and partial issues with has_many through
I have a User model, a Post model, and an Interest model:
User has_many posts through interests
User has_many interests, dependent destroy
Post has_many users through interests
has_many interests, dependent destroy
Post has_many interests
Interest belongs to Post
Interest belongs to User
Application_Controller is as follows:
class ApplicationController < ActionController::Base
before_filter
2006 Oct 31
1
Help with DRY. I feel like im doing more then I have to.
Throughout my Message controller, I do this a lot:
@message = Message.find(params[:id],:conditions => ["user_id = ?",
@session[''user''].id])
Since you need to authenticate to use this app, is there a way i can
tie the Accounts model in with the Message model so I dont have to pass
in the user_id everytime?
--~--~---------~--~----~------------~-------~--~----~
You