Project

concernize

0.0
No commit activity in last 3 years
No release in over 3 years
Concerns are very important to keep thing DRY and reusable and decoupling separate stack from your resources. This generator will help generating concern files faster with templates.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Development

~> 4
 Project Readme

Getting started

Concernize works from rails4.x.x:

gem 'concernize'

Run the bundle command to install it.

Once you are done with installation, you are ready to generate your concern files.

rails generate concernize models film concern

This will generate a concern file on the following directory

  # app/models/concerns/film_concern.rb

  module FileConcern

    extend ActiveSupport::Concern

    # define your object level methods here...

    # def method_one
    #   puts "wow!! working!!!"
    # end

    # included do

    # #type your class methods here...

    # end

    # class Post < ActiveRecord::Base
    #    include FileConcern
    # end

  end

The last argument (concern_namespace) is optional. You can generate a concern without a concern_namespace.

License

MIT-LICENSE. Free for humans :-)