Hello,
I was writting my Kaminari initializer file, I encountered some problem to
import my configuration from a yml file to the Kaminari::configuration
that''s use ActiveSupport::Configurable actually.
ActiveSupport::Configurable provides some method to access the configurable
keys, here is the best way I found to implement my initilizer:
Kaminari.configure do |config|
Settings.paginate.each do |key,value|
config.send(key.to_s+"=", value)
end
end
That works but I would have preferred writing something like :
Kaminari.configure do |config|
Settings.paginate.each do |key,value|
config[key] = value
end
end
So I have two question, Did I do that in the right way ? Why don''t
implement hasn access to config ?
I wanted to write that but I not sure that''s a good idea.
Thanks for reading
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to rubyonrails-core+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.