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
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
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
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’
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.
By default ‘fetty:setup` will asking you to setup Rspec / Cucumber, and it also setup “guard-rspec” and “guard-cucumber”.
This is stil under development mode, if you are having some problem with Fetty Generators, please submit an issue here.