Editing CommunityEngine?

92 views
Skip to first unread message

Jeremias Santos

unread,
Mar 13, 2014, 7:32:49 AM3/13/14
to communi...@googlegroups.com
Dear, 

I created a Rails project rails new myproject and follow the steps to install the CommunityEngine, but now wish to change the view and make implementations in CommunityEngine but do not know how to perform the procedure since it can not find where the font is stored CommunityEngine which was installed through the gem in Gemfile. 

Perhaps this is no doubt directly related to CommunityEngine, Poem for wearing this project and address the same issue then I believe the experience of someone who has performed the procedure can help more agile way. 

I thank the attention.

Dan Coutu

unread,
Mar 13, 2014, 8:58:18 AM3/13/14
to communi...@googlegroups.com
Jeremias, here is the process that I use to customize the views:

First you should understand that you can provide your own CSS style file in app/assets/stylesheets/styles.css.erb in order to specify style changes such as different text fonts.

I use an IDE that allows me to easily look at the files in the Community Engine (CE) gem directories but you may find it easier to use git to clone the CE code to a directory on your machine and refer to the files in there.

As a general rule you can create files in your app directory structure that have the same name as files in the CE gem directories and your file will override the original CE file.

NOTE: if you wish to override a controller or model then you should not just copy the entire file. Instead use the require_from_ce method to pull in the original CE controller or model code and then after that specify your overrides. So you can redefine an action, for example, or redefine the list of accessors in a model.

I hope this helps.

Dan
--
You received this message because you are subscribed to the Google Groups "CommunityEngine" group.
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.
Visit this group at http://groups.google.com/group/communityengine.
For more options, visit https://groups.google.com/d/optout.

Jeremias Santos

unread,
Mar 13, 2014, 9:20:03 AM3/13/14
to communi...@googlegroups.com
Got it. 

I have an index page and wish to change the index of CommunityEngine, then I do creating a file in my installation in app / views / layout / index.html.erb? 

How to know the fields eg login and password to connect to the controller? Would I download CommunityEngine project and then check the view and get the fields to then modify in my index page? 

Am I right? 

I appreciate your attention.

Dan Coutu

unread,
Mar 13, 2014, 9:26:25 AM3/13/14
to communi...@googlegroups.com
The default layout file would be app/views/layouts/application.html.haml (or you could use app/views/layouts/application.html.erb if you prefer).

The form field names are dictated by the database schema. After doing a database migration you will have a db/schema.rb file that tells you what all of your database tables and fields are called along with their datatypes and sizes.

I'm guessing by your questions that you are new to using Rails. You may want to find some online training resources to learn more about Rails so that this process is easier.

Dan
--

Jeremias Santos

unread,
Mar 13, 2014, 10:10:00 AM3/13/14
to communi...@googlegroups.com
Yes. 

I'm a Java and PHP developer, but I'm inciado with Ruby and Rails. I am studying, but at the same time need to follow or at least try to start a project to Community. 

Thank you for your attention. I will study and do more testing and if you doubt return to post.




On Thursday, March 13, 2014 8:32:49 AM UTC-3, Jeremias Santos wrote:

Jeremias Santos

unread,
Mar 24, 2014, 3:11:56 PM3/24/14
to communi...@googlegroups.com
As I said I'm using rails a while ago , but need to make this social network and so far found communityengine a better option .

I guess I was not very clear in my previous question .
Has a branch for rails 4 , which I am using : https://github.com/bborn/communityengine/tree/rails4

I realize that I go in app / view / * see the folders with pages of each controller , but the way it appears to perform the installation as a gem , so I created a new rails project and added the branch 4 of 4 rails and gem this new project , he installed and is running , but now I would like to know how do to change this layout that is being displayed , since the app / view the new project folder is empty .

The way you spoke and should I create a folder and files with the same name as this branch today in the repository and then it will switch to using what is in this folder and not the current installation . This is it ? Am I correct ?

I appreciate the attention .

Jeremias Santos

unread,
Mar 26, 2014, 2:54:02 PM3/26/14
to communi...@googlegroups.com
Got it running and could now make the initial changes. 

Thank you!

On Thursday, March 13, 2014 8:32:49 AM UTC-3, Jeremias Santos wrote:
Reply all
Reply to author
Forward
0 new messages