How to batch create posts?

12 views
Skip to first unread message

Giri

unread,
Mar 11, 2014, 11:10:57 PM3/11/14
to rubyonra...@googlegroups.com
So I have bookmark controller which has the 7 default RESTful actions. 

Now I would like to have a form for batch bookmark creation.

Its going to have a textarea field where user can fill with urls. (One URL per line)

Upon submission, I would like to bulk insert those urls to the database.

Can someone help me to achieve this?


Abdulsattar Mohammed

unread,
Mar 12, 2014, 2:28:23 AM3/12/14
to rubyonra...@googlegroups.com
Hi Giri,
There's a gem 'activerecord-import' (https://github.com/zdennis/activerecord-import/wiki) that lets you do that easily. All you need to do is call, `Url.import urls` 
Reply all
Reply to author
Forward
0 new messages