0

I am fairly new to web application development and I have a pretty noob question. As I understand, it is possible to write the backend of a web application - models, business logic, etc. using Rails and write the backend - the view - using just HTML, CSS Javascript (without using Rail's form helpers, embedded ruby, etc.) and that the said view would render data exposing a Rails API and making AJAX requests to it. Everytime I googled "rails ajax requests API" I have only found tutorials that explain how to use AJAX w/ embedded ruby instead of tutorials that clearly separate how to make a Rails API and make AJAX requests to render data. So my questions are:

1) If any of the above statements are incorrect, could you let me know?

2) Can someone point me to tutorials that help me understand the theory and implementation of the aforementioned topics?

Thanks!

3
  • why you dont want to use embed Ruby? Commented Jun 8, 2014 at 23:50
  • I want to build apps as flexible as possible so that non-rails developers can access and render the data as well Commented Jun 9, 2014 at 0:08
  • Ah OK! I leave some tutorial in the answer ! Commented Jun 9, 2014 at 0:09

1 Answer 1

1

The REST API generated by Rails can be consume by any client, if you want to use pure HTML and CSS withouth the .erb files (for me brings many advantages when developing) you can access to the Rails API data by AJAX.

I let you the following tutorial:

http://blog.project-sierra.de/archives/1788

Hope it helps

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.