Documentation for Community Engine Rails 3

173 views
Skip to first unread message

ted32

unread,
Jan 1, 2012, 8:49:52 PM1/1/12
to CommunityEngine
Is there any recent documentation for CE and Rails 3? I have
everything set up and running the sample site but am having trouble
with little things like broken code.

Bruno Bornsztein

unread,
Jan 4, 2012, 3:41:57 PM1/4/12
to communi...@googlegroups.com
Unfortunately, not really. I try to keep the README mostly up to date, but haven't had time to do any real documentation. As I've said before on this list, I'd LOVE some help getting the CE documentation up to snuff. 

Thanks!
Bruno


--
You received this message because you are subscribed to the Google Groups "CommunityEngine" group.
To post to this group, send email to communi...@googlegroups.com.
To unsubscribe from this group, send email to communityengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/communityengine?hl=en.


Bruno Bornsztein

unread,
Mar 18, 2013, 3:21:41 PM3/18/13
to communi...@googlegroups.com
Hi Dan,
Thanks for the offer to help. I'd be happy to review anything you do, or try to help answering questions. Let me know how you want to proceed.

Thanks,
Bruno

On Mon, Mar 18, 2013 at 10:42 AM, Dan Coutu <co...@snowy-owl.com> wrote:
Bruno, let's chat about the documentation then. I'm doing a major site using CE and I'm sure that a lot of what I'm doing would lead to some good documentation that I wouldn't mind writing as long as I can get authoritative reviews from you. In other words I don't want to write things that are wrong.

Dan
To unsubscribe from this group and stop receiving emails from it, send an email to communityengi...@googlegroups.com.

To post to this group, send email to communi...@googlegroups.com.

Dan Coutu

unread,
Mar 19, 2013, 9:23:44 AM3/19/13
to communi...@googlegroups.com
Bruno, as I go along I'll take notes on what I'm discovering and questions that arise. I'd suggest that perhaps I could send those your way every so often for feedback, review, and correction.

In the longer term I'd suggest perhaps making a group of files in the doc directory of the gem that contains the documentation files.

One thing that I'm noticing, by the way, is that much of the model find code will need to be revised to use the newer ActiveRecord conventions. In Rails 3.2 syntax like Page.find(:all) has been replaced with Page.all, for example. So there's a fair amount of revision needed to handle that kind of change alone. If you need pointers on this change to ActiveRecord I can help.

Here's some notes that I have so far:

When using require_from_ce() with a controller you must specify the full controller name (without the extension). It doesn't assume _controller is appended to the end of whatever you require.


Use your own routes.rb to override or add routes. If you override or extend the default controllers and wish to add routes for new actions it is not necessary to copy the entire original routes.rb file, simply add your customizations to your application's routes.rb file.


In some cases it may be easier to define custom routes than to extend actions of a RESTful controller. For example when I tried to extend the Categories controller by adding a browse action to support a page that allowed for dynamic browsing of categories I found that I got errors trying to specify a url like /categories/browse because it complained that browse was not a valid category id. This is because it was apparently matching the GET operation against the 'resources :categories' in the routes file. So defining this:

     get '/browse_categories' => 'categories#browse', :as => :browse_categories

solved the problem. I could then use :browse_categories_path as a URL helper within views to create links to the category browser page.


Blogging


Blog items are referred to as posts within the code. A post is always owned by the author, so it is tied to a User object. Optionally it may also belong to a category.


Blog posts support html tags, static pages (the pages model) do not.



--
You received this message because you are subscribed to a topic in the Google Groups "CommunityEngine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/communityengine/7EwrnO3HHbQ/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to communityengi...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages