0.0
No commit activity in last 3 years
No release in over 3 years
Looks further than the obvious when trying to create a constant from a string
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
 Project Readme

Constantine

module Support
  class Ticket
  end
end

> Constantine.constantize("SupportTicket")
=> Support::Ticket 

Caveat Emptor!

A railtie exists for patching ActiveSupport's implementation:

"SupportTicket".constantize

The idea was to allow more implicit definitions in a Rails app with a lot of namespace modules:

has_many :support_tickets

instead of

has_many :support_tickets, :class_name => "Support::Ticket"

It seems to break too much auto-loading to be useful, so I honestly can't actually recommend using this for anything right now. It's just an experiment.

Copyright

Copyright (c) 2011 Jason L Perry. See LICENSE for details.