Skip to content

lyneux/prattle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prattle

Prattle is a Rails engine providing forum functionality. It provides basic forum, topic and post functionality to the parent application.

Prattle focuses on sensible functionality ahead of Ruby-on-Rails cleverness to deliver a forum that works rationally and looks great.

Installation

Installing prattle is simple:

Specify Gem dependencies

gem 'prattle', :github => "lyneux/prattle"

Add an initialiser to the parent app:

Create a prattle.rb file in config/initalizers

Prattle.user_class  = "Your user class"
Prattle::ApplicationController.layout "Your layout"

Add a prattle_user helper method to your Application Controller

This allows prattle to link posts to the user who is currently logged into your application

  def prattle_user
    current_member
  end
  helper_method :prattle_user

Add a prattle_image helper method to your member class

This allows prattle to display an avatar image for your user (uses a paperclip image)

  def prattle_image
    image
  end

Add a prattle_admin? helper method to your session helper

If you have your own authentication scheme, you likely also have your own authorisation scheme. This method should return true if the current user is an administrator

  	def prattle_admin?
		#Your code here. Example:
		current_member.member_admin? if !current_member.nil?
	end

Copy over and run the migrations

In your parent app:

rake prattle:install:migrations
rake db:migrate

About

No description, website, or topics provided.

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
MIT-LICENSE

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •