Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Tag
- id
- name
- has_many :offer_items
- has_many :offers, :through => :offer_items
- Offer_item
- id
- tag_id
- source_id
- belongs_to :source
- belongs_to :tag
- Action:
- @offer_item = OfferItem.find(params[:id])
- def redirect
- redirect_to @offer_item.offer.url
- puts "Nu vet vi vilken tag han kom igenom: #{offer_item.tag}"
- end
- Offer
- id
- url
- caption
- description
- has_many :offer_items
- has_many :tags, :through => :offer_items
Add Comment
Please, Sign In to add comment