# Please help me to complete this task how i start?

**URL:** <https://www.ruby-forum.com/t/please-help-me-to-complete-this-task-how-i-start/209654>\
**Category:** Rails\
**Created:** [July 19, 2011, 5:31pm UTC](https://www.ruby-forum.com/t/please-help-me-to-complete-this-task-how-i-start/209654 "2011-07-19T17:31:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [July 19, 2011, 5:31pm UTC](https://www.ruby-forum.com/t/please-help-me-to-complete-this-task-how-i-start/209654/1 "2011-07-19T17:31:09Z")

</div>

There is Company which builds products(Consider this company a  
software company).

- These Products can have some Documents (PDF or HTML format uploaded  
some where online you can store links to these documents in database,  
you don’t have to create any upload functionality).
- The users to this project are the Employees itself few of them can  
be Admin inside so that they can Create new Users inside the system  
(Actually User is STI and Admin, Employee, Client are the types of  
User).
- Only Admin has rights to Add or Edit Users and Purchase  
details(Creation of users can like Creating a Admin or a Employee or a  
Client And by Purchase details I mean Making Entry of Purchases made  
by Client and other purchase details).
- The Admin and Employee has rights to Add or Edit Product and  
Document
- A Client can login in to the system to view Documents or download  
products that he had already purchased.
- And finally generate following reports for Admin  
- Showing Details of products inside the system.  
- Showing Client names and the products that they have  
purchased  
- Showing Details of Product Documents (Product name and few  
document details)

Following are the models that you can create:-

User  
Admin  
Employee  
Client  
Product  
Purchase  
PurchasedProduct  
Document  
ProductDocument

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 19, 2011, 5:34pm UTC](https://www.ruby-forum.com/t/please-help-me-to-complete-this-task-how-i-start/209654/2 "2011-07-19T17:34:52Z")

</div>

On 19 July 2011 12:05, Dhaval M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> There is Company which builds products(Consider this company a  
> software company).

This reads suspiciously like a homework/assignment question…

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 19, 2011, 6:10pm UTC](https://www.ruby-forum.com/t/please-help-me-to-complete-this-task-how-i-start/209654/3 "2011-07-19T18:10:49Z")

</div>

rails new

Your models are all off, especially if using STI. The user model  
should cover all users. Use a column to differentiate between admin,  
Employee…etc. Product is another model with a purchased flag and  
documents is a third model.

Use Devise and Cancan for logging in an permissions

And there you have it!! Good luck man, this sounds like a paid  
assignment more than anything else. Knock 'em dead.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 22, 2011, 11:47am UTC](https://www.ruby-forum.com/t/please-help-me-to-complete-this-task-how-i-start/209654/4 "2011-07-22T11:47:05Z")

</div>

Michael P. wrote in post #1011668:

> On 19 July 2011 12:05, Dhaval M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > There is Company which builds products(Consider this company a  
> > software company).
> 
> This reads suspiciously like a homework/assignment question…

Yes its task for me..

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 22, 2011, 1:28pm UTC](https://www.ruby-forum.com/t/please-help-me-to-complete-this-task-how-i-start/209654/5 "2011-07-22T13:28:48Z")

</div>

On 22 July 2011 10:52, Dhaval M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> No its not paid assignment.. its jst a task..  
> can u please tell me step by step from where i should start..  
> Thankx..

I suggest you revise all the course material you have been given, and  
read  
all your notes. Then start working on the problem.  
If you have any specific question (as opposed to generic “how can I do  
this  
homework?”), ask them…

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 22, 2011, 1:36pm UTC](https://www.ruby-forum.com/t/please-help-me-to-complete-this-task-how-i-start/209654/6 "2011-07-22T13:36:14Z")

</div>

ok thank you…

On Fri, Jul 22, 2011 at 4:56 PM, Michael P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> homework?"), ask them…

–  
_Regards,  
Dhaval M._

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 22, 2011, 11:52am UTC](https://www.ruby-forum.com/t/please-help-me-to-complete-this-task-how-i-start/209654/7 "2011-07-22T11:52:42Z")

</div>

bertly\_the\_coder wrote in post #1011681:

> rails new
> 
> Your models are all off, especially if using STI. The user model  
> should cover all users. Use a column to differentiate between admin,  
> Employee…etc. Product is another model with a purchased flag and  
> documents is a third model.
> 
> Use Devise and Cancan for logging in an permissions
> 
> And there you have it!! Good luck man, this sounds like a paid  
> assignment more than anything else. Knock 'em dead.

No its not paid assignment.. its jst a task..  
can u please tell me step by step from where i should start..  
Thankx..
