Wheather to implement crud or cms for a restaurant website? - ruby-on-rails

I am thinking of doing a website for a small local restaurant to build my portfolio.
I am in the process of planning out what functionality there would be and the first thing was the menu page. I would like the restaurant owners to be able to sign in and make changes to menu like prices, description and items. I have also been using rails gem devise to use authentication so I was thinking of making an admin account so that they can log in and make the changes. Does it sound like an okay plan? If not, whats the best route? And will CMS like Refinery and Spina also achieve the same objective like crud?

Related

Documents on a rails website

I am developing a portal of sorts in Ruby on Rails using PostgreSQL.
I require different pages (each page represents a different topic of interest) on the portal to show different documents. The admin will have the ability to upload additional documents to each page.
No where is the entire list of documents on the website required
What is the best practice to implement such a system and is there any tutorials for the same?
It sounds like you want a content management system. Alchemy CMS is a good choice for rails.
That's a multi-tenant application, and normally you do this by associating all the records with a user or an account, sometimes both. This is done with a has_many/belongs_to pair most of the time for any records that are user or account specific.
You'll also have to be specific in each controller to only access records that the person can see, so you'll need to define an access control mechanism of some kind. There's modules for this, writing your own can be tricky.

Creating a User control panel for multiple user_types in Rails

I am developing a job portal website as part of a project for university and not exactly sure how to approach this problem, I am using Devise for my authentication system allowing users to sign, The system will have many user_types (job_seeker, company).
At the moment I am using “Rails_admin” for the admin interface, but I am looking to create an interface where a company can manage their jobs, applications, etc, and for job_seekers to view their previous job applications, and job status etc.
My plan was to develop it so in the controller it checked the user_type and then redirected it to a control panel, which would hopefully allow all users go sign in using one login page, but my question is, how do I go about developing a “job_seeker” and “Company” control panels where they can manage their details.
I am looking for information on how to approach this problem, or the best method to achieve a solution.
Did you try using a gem that allow you or simplified role user management like cancan?
A good approach is as Maxence said, have a namespace for every role and a dashboard controller to show what you need. This will help you to keep things spited and will be more easy to maintenance. You can check it here how use namespaces. You can do it as well with a resource but I dont like it.
Other thing that you can do is having a single dashboard controller and redirect depending of the user role.

Is it possible to integrate Redmine into another website?

I have an application I'm designing for a client and one of the features they requested was the ability to track tickets. I'm currently using Redmine and redirecting people to my instance so they can add tickets, issues, etc., however I'd like to integrate it into the actual website so I don't have to redirect users. Ideally, it would be a tab or sidebar that users could expand, add their ticket information, and then collapse.
I've seen a variety of questions about integrating other sites into Redmine, but is it possible to do it the other way around? Is there a way to do this or will I have to build my own system?
Looks like the easiest way to do this is by building your own form and using the Redmine API

Multi user/site rails app

I need to create a web app where people will sign up, call it main-app.com, when they sign up my code will generate a usersite.my-app.com, they will login and only be able to manage their mini site. My question is, is it correct to model this out by creating a table for site, a table for user, users belong to site and site has many users. Then I should create a content table that belongs to user AND site?
Is that right?
I am working on this for one of my apps at the moment using the Devise authentication plugin.
To get the central user environment, I was simply going to shard the database using Octopus, Connection_ninja. All are on Github
It's a starting point but not the full solution I'm afraid as I haven't got there myself yet. There are going to be issues to consider such as determining authorization of app specific resources based on which site the user has registered.
Alternatively, The latest edition of Ruby Weekly links to an interesting article on a Ruby implimentation of the Central Authentication Service protocol. It will be worth a read - http://blog.econify.com/2010/12/introducing-classycas.html
Hope this helps a bit...

What are people's opinions vis-a-vis my choice of authorization plugins?

I'm slowly but surely putting together my first rails app (first web-app of any kind in fact - I'm not really a programmer) and it's time to set up a user registration/login system. The nature of my app is such that each user will be completely separated from each other user (except for admin roles). When users log in they will have their own unique index page looking at only their data which they and no-one else can ever see or edit. However, I may later want to add a role for a user to be able to view and edit several other user's data (e.g. a group of users may want to allow their secretary to access and edit their data but their secretary would not need any data of their own).
My plan is to use authlogic to create the login system and declarative authorization to control permissions but before I embark on this fairly major and crucial task I thought I would canvas a few opinions as to whether this combo was appropriate for the tasks I envisage or whether there would be a better/simpler/faster/cheaper/awesomer option.
What about cancan by Ryan Bates?
Here you can get a complete visual guided implementation
Take a look at this, it might help:
Basic Rails 3 engine utilizing Authlogic, CanCan and Easy Roles
What about Devise? Take a look at the railscasts.com site.

Resources