In my project i require a bit.ly link for each new product entered in
the database. Please guide me on how to do this?

Note: I am using a standard rails app with basic actions to test this
code

I plan on writing a helper function which will be able to take the id
for the new record and return the link.

Here are my questions:

1) Should I add the link column in the same table as the product or
create a new table with just a vehicle id and its corresponding bit.ly
link?

2) Where in the controller should i make the call to create the link as
a product id will be required before the link can be generated and I am
not 100% sure where exactly in the controller when creating a new record
is the new record id available to be accessed.

Apologies in advance if the questions is not very clear but any help
will be greatly appreciated.
-- 
Posted via http://www.ruby-forum.com/.

--

You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en.


Reply via email to