In this part we look at the basic set of requirements for our text editor. I have no doubt that these requirements will change, but let’s have a quick look to get an idea of the direction we are heading in.
Text Editor Requirements
As mentioned in part 0, the text editor is going to be a very basic editor. It will maintain a version history that will allow users to roll back to a previous version of a document. This requirement is what will make this task interesting and worthwhile.
We would like to end up with screens similar to this:
The documents index page:
Clicking ‘show’ will show the related document and give the user an option to edit it.
Clicking ‘edit’ will show a form that allows the user to edit the document. When the user clicks ‘save’, the application creates a new version, without overwriting existing versions.
We will be providing this behaviour with a slight ‘twist of hand’. I will come back to this point when we actually implement it.
Clicking ‘delete’ will completely remove the document and all its versions – this is not a roll back.
If the user clicks on ‘History’ on ‘Second one’. We expect to see a screen similar to this:
Clicking ‘show’ will show the relevant version.
Clicking ‘rollback’ will delete the latest version, thus rolling back to the previous version – this is deleting one version only, not the entire document.
What is next?
Next we will have a quick look at the database schema and then we finally move onto Rails code! We will not be using the scaffolding features of Ruby on Rails. We will create our application from the ground up – generating models, controllers and views independently. We will also be coding using TDD. If you are new to Rails, I am sure you will enjoy the upcoming posts.


July 12, 2008 at 9:02 am
[...] Thinking in Rails – Part 0 Part 1 [...]
August 2, 2008 at 4:51 pm
Daryn,
Thank you so much for addressing the Save As question. I eagerly await your solution.
August 14, 2008 at 4:11 pm
This reminds me of a file upload system I made for a client so far; complete with versioning. I look forward to seeing how you are going to approach this.
September 11, 2008 at 8:40 am
Hello,
is there a part two in the future?
–
Regards,
Marco Mangiante
September 11, 2008 at 8:46 am
Hi Marco,
I have been a bit overloaded at work. I will try to get out part 2 soon.
Apologise for the long wait…
April 17, 2009 at 5:06 pm
hi
are you still working on this tutorial?
i would like to read more, as your tutorials are really great.
April 25, 2009 at 8:56 am
Same Here, I am looking forward for part 2, Thanks