GithubHelp home page GithubHelp logo

hepu / forem Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rubysherpas/forem

0.0 2.0 0.0 2.48 MB

The best Rails 3 and Rails 4 forum engine. Ever.

Home Page: http://forem.herokuapp.com

License: MIT License

Ruby 99.94% CSS 0.02% JavaScript 0.03%

forem's Introduction

Forem for Electorate.me

This is a fork of the Forem gem, used in the implementation of forums in Electorate.me

Getting Started

Inside Electorate.me, Forem uses Redis to save the Forem::Category ID's used in the basic categories. Also, it saves the ID for the Forem::Group used for Moderators

Redis is initialized in config/initializers/redis.rb as $redis, in the Electorate.me app.

Retrieve basic ID's used in Forem

To retrieve the basic ID's used in Forem, the following method is used:

$redis.get('key_of_the_id_stored')

Currently, the keys stored are:

communities_category_id
leaders_category_id
general_category_id
moderators_group_id

For example, to retrieve the ID for the Leaders category, you use $redis.get('leaders_category_id')

Initializing Forem in the server

Initializing forem is easy!

Initialize

First, initialize Forem's basics (categories and moderator's group):

bundle exec rake forums:initialize

Create Leaders forums

This command takes the Leadership Positions of every Movement and creates a forum for each one, inside

bundle exec rake forums:create_leaders

Create Communities forums

This command creates the Category forums for each Movement according to its Scope

bundle exec rake forums:create_communities

Create Moderators forums

This command imports the Leadership Users which state is Active of each Movement and recognizes them as Moderators of the Movement's forum

bundle exec rake forums:create_moderators

Clear all content

This command destroys every Forum, Category, Group of the database

bundle exec rake forums:clear

##Setting a user as Superadmin ('Access Denied' message)

If you try to access the Admin Area and the message Access Denied pops up, it's necessary to set the user as Superadmin.

To do this, access the Rails Console in the server and find the User, then set its attribute forem_admin to true and save the User.

Methods applied to the User model

These are the basic Forem's methods implemented in the User model:

forem_name
forem_email
forem_moderator(movement)

forem's People

Contributors

browning avatar caffo avatar dapz avatar filiptepper avatar fracek avatar frankel avatar gabrielbaez avatar glebm avatar hepu-appmeup avatar idearise avatar jgadbois avatar johanb avatar juozasg avatar kunalchaudhari avatar mauriciopasquier avatar nashby avatar nebiros avatar ninjarobert avatar nruth avatar parndt avatar phiggins avatar phlipper avatar radar avatar raid5 avatar sfcgeorge avatar strd6 avatar tanraya avatar tigercat avatar ugisozols avatar victormartins avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.