Fetty Generators

Gem dependencies :

  • CanCan

  • simple_form

  • ckeditor 3.5.4

  • kaminari

  • carrierwave

  • etc. (it will automatically setup the gems)

This generators only works with Rails 3

Setup

Rails 3

Add the gem into your Gemfile.

gem 'fetty-generators', :group => :development

run the setup first!

rails g fetty:setup

or if you like to using with MongoDB, this generator will works with mongoid

rails g fetty:setup --mongoid

Then generate the layout

rails g fetty:views layout

And then you just simply type the command ‘fetty:scaffold` for scaffolding

rails g fetty:scaffold post title:string content:text published:boolean

Don’t forget to run ‘rake db:migrate` if you are using ActiveRecord

Additional field type

This version using carrierwave for handling an attachment and ckeditor for WYSIWYG editor, by passing ‘image’, ‘file’ and ‘editor’ as an argument when generate a scaffolding.

rails g fetty:scaffold post title:string content:editor photo:image attachment:file

Fetty:Authentication

This generator will generate simple authentication for your rails app.

rails g fetty:authentication

after generate the authentication you may need to change root_url on ‘config/routes.rb’ and setting your ActionMailer email address on ‘config/initializers/setup_mail.rb’

Fetty:Messages

This generator will generate simple messaging system for your rails app

rails g fetty:messages

Required you to have user model, please generate ‘fetty:authentication` first at this moment `fetty:messages` only works with ActiveRecord.

Test Framework

By default ‘fetty:setup` will asking you to setup Rspec / Cucumber, and it also setup “guard-rspec” and “guard-cucumber”.

Found a bug?

This is stil under development mode, if you are having some problem with Fetty Generators, please submit an issue here.

github.com/fajrif/fetty-generators/issues