Displaying 2 results from an estimated 2 matches for "find_by_posit".
Did you mean:
find_by_post
2007 May 28
2
Rails, respond_to? over anonymous module (extend has_many).
...item = proxy_owner.playlist_items.build(:asset => asset)
item.save unless proxy_owner.new_record?
proxy_owner.duration += asset.duration
end
proxy_owner.save unless proxy_owner.new_record?
end
def delete_at (position)
pli = proxy_owner.playlist_items.find_by_position(position) rescue nil
unless pli.nil?
duration = pli.asset.duration
proxy_owner.playlist_items.delete(pli)
proxy_owner.update_attributes( :duration =>
(proxy_owner.duration - duration) )
end
end
def order
return [] if proxy_owner.new_record?...
2006 May 03
8
hiding table IDs from users
I was wondering if anyone had thoughts on the most efficient way of
making sure users never see internal table IDs? Clearly, scaffold views
show a lot of IDs by default and those can be hidden. The problem seems
to be all of the IDs that Rails passes around in URLs (such as
http://mysite.com/user/show/12345).
My primary concerns are security and confidentiality--one can imagine
that there