Skip to content

Check with defined? to automatically load extensions#53

Open
r7kamura wants to merge 1 commit intobiola:masterfrom
r7kamura:defined
Open

Check with defined? to automatically load extensions#53
r7kamura wants to merge 1 commit intobiola:masterfrom
r7kamura:defined

Conversation

@r7kamura
Copy link

What about checking with defined?(Rack) and defined?(Rails::Railtie) to automatically load the available extensions? This way, the user will not have to require: ... .

This method is often used in Rails plugins. For example, here is an example of kaminari, a well-known plugin for pagination:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant