Maybe its since I am using the feed items differently than they were
supposed to I am asking myself what the setup method is trying to do:

def setup
    @profile = Profile[params[:profile_id]]
    if @p != @profile
      respond_to do |wants|
        wants.html do
          flash[:notice] = "Sorry, you can't do that."
          redirect_back_or_default @profile
        end
        wants.js { render(:update){|page| page.alert "Sorry, you can't
do that."}}
      end
    end
  end

It seems originally feed items are supposed to show up on each other
user profile pages. Through generally missleading @p stands for my
profile and @profile for the profile I am visiting. So if I am
visiting somebodys elses profile and want to delete a feed item i get
an error message and get redirected to the profile I was looking at.
Is that the purpose?

I have to menthion that the destroy method:

  def destroy
    @profile.feeds.find(:first, :conditions => {:feed_item_id=>params
[:id]}).destroy

    respond_to do |wants|
      wants.html do
        flash[:notice] = 'Item successfully removed from the recent
activities list.'
        redirect_back_or_default @profile
      end
      wants.js { render(:update){|page| page.visual_effect :puff,
"feed_item_#{params[:id]}".to_sym}}
    end
  end

Tries to find feeds on the profile I am seeing right now.

What I was wondering about too is that the feed_helper is calling the
method delete instead of destroy but that might be ruby conventions
that it gets redirected to the destroy method.

link_to_remote image_tag('delete.png', :class =>
'png', :width=>'12', :height=>'12'), :url => profile_feed_item_path
(@profile, feed_item), :method => :delete


Btw. I love the polymorphic idea behind those feeds ;)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Lovd by Less" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/lovdbyless?hl=en
Who loves ya baby?
-~----------~----~----~----~------~----~------~--~---

Reply via email to