Add a form/method that submits in Rails with AJAX

Completed Posted Nov 30, 2013 Paid on delivery
Completed Paid on delivery

We're working on a project and need a bit of code written that does the following:

1. Submits a form via AJAX through a modal/lightbox.

2. Refreshes the main content to reflect the new data that was submitted.

Attached are two pieces of code. Here's the scenario.

We have a form ([login to view URL]) that allows a user to create a new book with a Title, Author, and Release Date. The form has a list of previously submitted Chapters (A book has many chapters with a number and a name). Within this form is a modal/lightbox (utilizes bootstrap). The modal allows the user to submit a new chapter to the book.

[login to view URL] is the controller for the Book. I've removed unnecessary code form it. You can see the current create/new methods - and a place holder for the create_chapter method. Chapters have the following attributes (book_id, name, number).

What I need done:

- Need to modify the [login to view URL] to utilize AJAX on the modal window to submit the new chapters. (around line 56 - says "FORM GOES HERE")

- Need to modify the [login to view URL] need to pull in the chapters to display on the page after they are submitted. (around line 34 - you'll notice the conditional loop)

- Need to add/modify the controller to accept and save the new chapters, and also do the appropriate refresh to the code (if needed here) to display the newly updated chapters.

Notes:

1. This code will be reused on the edit method as well. Please keep this in mind.

2. We don't believe you need any more code than what's provided - but let us know if something would help.

3. Ask with questions. Please use the PM feature to do so.

4. We believe this should be a quick task for someone familiar with AJAX and tapping into JS in Rails. We're aiming to award in 1-2 days and receive final product in 1-2 days after, tops.

5. We put a budget of 10 - 30 dollars, which should be reasonable for the amount of work (couple of quick methods). Bid what you're comfortable with. We'll select a combination of low-cost bidding and ability to deliver fast.

Again - ask with questions. Thanks for reviewing this project and we look forward to working with you.

AJAX JavaScript Ruby on Rails

Project ID: #5182709

About the project

6 proposals Remote project Active Dec 1, 2013

Awarded to:

yct21

Not a very hard problem. I could finish it in one day. Wrap the chapter list with some div Set remote attribute of the button to "save changes" button in the model Write BooksController.new_chapter. Respond using More

$15 USD in 1 day
(1 Review)
0.4

6 freelancers are bidding on average $25 for this job

sandeepsrm23

Dear Client I want to handle this job for you. I have 4 years of experience in ROR and familiar with Ajax , Jquery , Javascript , bootstrap , modals etc. I am looking forward for respose from your side. More

$28 USD in 3 days
(28 Reviews)
5.5
VidurangaW

Hi, I'm web developer with lot of experience both back-end and front end. I'm know languages such as java-script, jquery ruby on rails, php and mysql. So obviously I'm very familiar with ajax communication. I can do th More

$45 USD in 2 days
(21 Reviews)
4.8
ahmadhamza89

Hi, Need to know the attributes for the form. Book_chapters is the class??? Waiting for your reply. Thanks, Ahmad hamza

$20 USD in 1 day
(0 Reviews)
0.0
tupper8

A proposal has not yet been provided

$25 USD in 3 days
(0 Reviews)
0.0