Reputation: 83
I want to put spreedly in my new rails app.Because i am newbie can anyone help me with the spreedly gem?It says you must Configure your API key and site name for your account:
RSpreedly::Config.setup do |config|
config.api_key = "your-api-key"
config.site_name = "your-site-name"
end
Where should i put that?I need to make a initializer for this? And then i want to have a subscription system.Should i have to make a controller to handle subscriptions?Please Help!
Upvotes: 0
Views: 351
Reputation: 1585
It might be environment specific so you could do this in initializer
if Rails.env.development?
elseif Rails.env.test?
else
...
Or just put different values in test.rb, develoment.rb and production.rb
Upvotes: 0
Reputation: 14983
I would put that code in config/initializers/spreedly.rb
.
Without knowing more about your application, it's hard to answer your second question, but I would say: yes.
Upvotes: 1