Skip to content

Commit

Permalink
needs to be @source.credential not just credential in the controller …
Browse files Browse the repository at this point in the history
…class
  • Loading branch information
adamblum committed Feb 9, 2009
1 parent 9dc2818 commit c8c036c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/sources_controller.rb
Expand Up @@ -19,9 +19,11 @@ def show
@source=Source.find params[:id]
@app=@source.app
check_access(@app)


@source.refresh(@current_user) if params[:refresh] || @source.needs_refresh
objectvalues_cmd="select * from object_values where update_type='query' and source_id="+params[:id]
objectvalues_cmd << " and user_id=" + credential.user.id.to_s if credential
objectvalues_cmd << " and user_id=" + @source.credential.user.id.to_s if @source.credential
objectvalues_cmd << " order by object,attrib"
# if client_id is provided, return only relevant object for that client
if params[:client_id] and params[:id]
Expand Down

0 comments on commit c8c036c

Please sign in to comment.