How can I rename a Ruby library module's namespace? -


i'd use ruby stripe library in rails app. uses module stripe namespace.

i want use stripe namespace activerecord models, , rename library module stripeapi, e.g. stripeapi::charge refers stripe library, stripe::charge refers stripe-namespaced activerecord model (so e.g. stripe::charge.create(...) creates database record, rather making api calls).

is there way this?

(sure, rename namespace, or try use differently named models, find kinda ugly.)

i recommend rename own namespace since have full control on code. otherwise become pain in ass if want update version of stripe gem or search bug relating namespace original stripe namespace.

it's lot easier change own namespace instead of changing existing gem (eventually every version again).


Comments

Popular posts from this blog

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -