Rails CMS best fit

153 views
Skip to first unread message

Erwin

unread,
Oct 16, 2012, 6:32:29 PM10/16/12
to Ruby on Rails: Talk
I already have a project with multiple subdomains under development
( Rails 3.2.8 , MySQL, Haml , Devise , Cancan )

www.myproject.com is the main site
many subdomains will be created : sub1.myproject.com,
sub2.myproject.com, sub3.myproject.com, ...

We need now to add CMS functionalities to the main domain and to each
subdomain, ( different layouts , different sets of pages )

What could be currently the best CMS engine choice ? ( at least the
most adapted to this goal..)
Radiant , Alchemy Refinery or even Locomotive ( with this one, I know
we should switch to Mongoid ORM, but why not ..) or any other
one ...

thanks for feedback

Erwin

unread,
Oct 17, 2012, 2:26:56 AM10/17/12
to Ruby on Rails: Talk
Seems that Alchemy CMS engine mounted at subdomain level could do the
job... it's a pure "content" management app... managing only content
will test it

masta Blasta

unread,
Oct 17, 2012, 10:09:59 AM10/17/12
to rubyonra...@googlegroups.com
Kad Kerforn wrote in post #1080098:
I've just started building a site with BrowserCMS. It's fairly well
featured, and allows for easy integration of outside controllers and
models. Documentation is good - not great - however the developers are
really responsive in the google group.
here is the project: https://github.com/browsermedia/browsercms
One thing about browserCMS is that it uses it's own authentication
methods so you might have issues using Devise.

I also tried locomotive but i found it lacking in features and
documentation. Also the switch to mongoid has a learning curve to it if
you're not already familiar. Locomotive has potential, but it is still
early in development. https://github.com/locomotivecms

--
Posted via http://www.ruby-forum.com/.

Erwin

unread,
Oct 18, 2012, 5:30:51 AM10/18/12
to Ruby on Rails: Talk
Thanks for your feedback..

I also looked into Locomotive, good ( I know Mongoid) but the project
needs MySQL...
After looking at other existing Rails CMS : Alchemy, Radiant,
Refinery, Comfortable Mexican Sofa ( C.M.S. !) and also browserCMS, my
feeling is that none of them are actually true good engines for our
project .. rather than describing what I mean by that , better giving
an example of a good one : "forem" ( https://github.com/radar/forem )

'forem' brings a complete forum app as an engine to our existing rails
web apps:
- can be mounted at root or subdomain level,
- reuse our Devise authentication module, forem initialize with the
declared 'user' class, and 'current_user' helper
- forem internal authorization is based on CanCan, and permissions
can be superseded within the declared 'user' class

said that, we are currently looking into Alchemy code ( good 'content'
management ) to see how we could adapt it (to the 'forem' way)
regarding authentication and authorization ( I know that the new
Refinery aims at using authentication/authorization engines.... but
Refinery cannot be mounted at subdomain level which is mandatory in
our project

thanks again

Erwin

unread,
Oct 21, 2012, 10:27:31 AM10/21/12
to Ruby on Rails: Talk
Hi Oleg , I am working on it right now ... I like it being Rails-
minded, so easier to hack , I also like it because it doesn't have any
concept of users...

I ma trying to move the 'cms-admin' module into my backoffice as a

On 20 oct, 20:02, GBH <oleg.khaba...@gmail.com> wrote:
> Hey Erwin
>
> - ComfortableMexicanSofa is mounted as a catch-all on the root path as a
> default. I'll make it mountable soon, but it works just the same right now.
> - There's concept of 'sites' so you can serve completely different content
> based on the subdomain. But technically it can take care of everything that
> doesn't hit your application routes.
> - Comes with simple httpauth that you can replace with Devise or whatever
> else you want. See wiki for example.
> - Doesn't have user permissions though (it has no concept of users). This
> is something that is possible to hack in as part of the authorization.
>
> Let me know if you have any questions. I might be able to help.
>
> Oleg
> > > >www.myproject.comis the main site

Erwin

unread,
Oct 21, 2012, 10:36:08 AM10/21/12
to Ruby on Rails: Talk
been cut off..
I am trying to move the 'cms-admin' part into my backoffice as a lib
module and using the cms-content for site rendering...
I have an issue using the Cms::Site model , it works at app level
( getting Cms::Site.all = [] in the console
but when called from the backoffice named space, :
LoadError (Expected /Users/..../app/models/cms/site.rb to define
Site):


see my post https://groups.google.com/group/rubyonrails-talk/browse_thread/thread/80b8f8033e6b1474?hl=fr


On 20 oct, 20:02, GBH <oleg.khaba...@gmail.com> wrote:
> Hey Erwin
>
> - ComfortableMexicanSofa is mounted as a catch-all on the root path as a
> default. I'll make it mountable soon, but it works just the same right now.
> - There's concept of 'sites' so you can serve completely different content
> based on the subdomain. But technically it can take care of everything that
> doesn't hit your application routes.
> - Comes with simple httpauth that you can replace with Devise or whatever
> else you want. See wiki for example.
> - Doesn't have user permissions though (it has no concept of users). This
> is something that is possible to hack in as part of the authorization.
>
> Let me know if you have any questions. I might be able to help.
>
> Oleg
>
>
>
>
>
>
>
> On Thursday, October 18, 2012 5:31:17 AM UTC-4, Erwin wrote:
>
> > > >www.myproject.comis the main site

Oleg

unread,
Oct 21, 2012, 12:31:54 PM10/21/12
to rubyonra...@googlegroups.com
Something is not loading right. When rails loads models it assumes that
the folder that is nesting them is a namespace. So /app/models/foo/bar
can define Foo::Bar
If you're manually moving things around try making model look like this:

module Cms
class Site

instead of current

class Cms::Site

Erwin

unread,
Oct 22, 2012, 5:01:48 PM10/22/12
to Ruby on Rails: Talk
Thanks.. I'll test it
in parallel I am also testing the standard 'cms-admin' ( adapting my
backoffice admin to cms-admin) vs including the cms-admin module into
my backoffice, as my current concern is to stick to my backoffice
design ( layout/css) being used for additional features


On 21 oct, 18:31, Oleg <o...@khabarov.ca> wrote:
> Something is not loading right. When rails loads models it assumes that
> the folder that is nesting them is a namespace. So /app/models/foo/bar
> can define Foo::Bar
> If you're manually moving things around try making model look like this:
>
> module Cms
>    class Site
>
> instead of current
>
> class Cms::Site
>
> On 10/21/2012 10:36 AM, Erwin wrote:
>
>
>
>
>
>
>
> > been cut off..
> >   I am trying to move the 'cms-admin' part into my backoffice as a lib
> > module and using the cms-content for site rendering...
> >   I have an issue using the Cms::Site  model , it works at app level
> > ( getting Cms::Site.all = [] in the console
> > but when called from the backoffice named space, :
> > LoadError (Expected /Users/..../app/models/cms/site.rb to define
> > Site):
>
> > see my posthttps://groups.google.com/group/rubyonrails-talk/browse_thread/thread...
> >>>>>www.myproject.comisthe main site

Jay Damodaran

unread,
Oct 23, 2012, 2:54:02 AM10/23/12
to rubyonra...@googlegroups.com
Functionality wise, I've had really easy time integrating these CMS
libraries.

https://www.filepicker.io/products/libraries/

Let's you grab content through urls.

Erwin

unread,
Oct 23, 2012, 3:57:45 AM10/23/12
to rubyonra...@googlegroups.com
My issue seems to be related to Rails railties :     action_controller/metal/params_wrapper.rb#_default_wrap_model

quoted :
 # Determine the wrapper model from the controller's name. By convention,
      # this could be done by trying to find the defined model that has the
      # same singularize name as the controller. For example, +UsersController+
      # will try to find if the +User+ model exists.
      #
      # This method also does namespace lookup. Foo::Bar::UsersController will
      # try to find Foo::Bar::User, Foo::User and finally User.

So, I ma trying to access  Cms::Site model from my own admin controller:  Backoffice::CmsAdmin::SitesController
Then it's looking for    Backoffice::CmsAdmin::Sites,  CmsAdmin::Sites,  Sites

but even if I use the controller Cms namespace, Backoffice::Cms::SitesController
and  the model defined :      class Cms::Site < ActiveRecord::Base   ( I also tried  module Cms and class Site )
I get the same error :

LoadError in Backoffice::Cms::SitesController#index

.../app/models/cms/site.rb to define Site

 

weird .. in the console    Cms::Site.all gives [] , so the model is correctly loaded...

Erwin

unread,
Oct 23, 2012, 5:43:29 AM10/23/12
to rubyonra...@googlegroups.com
[SOLVED]  I guess..
It seems I had a wrong route in my cms_admin namespace

      namespace :cms_admin, :except => :show do  
         match '/', to: 'base#jump'
           resources :sites do
 is the correct one...

but I tried to bypass the base controller and I wrote
      namespace :cms_admin, :except => :show do  
         match '/', to: 'sites#index'
           resources :sites do

this raised the error : asking for Site being defined ....
Reply all
Reply to author
Forward
0 new messages