Open malclocke opened 13 years ago
Hey Malc, I've been playing with Rails 3 responders and it seemed to fit in here. Have a look here https://github.com/bradleypriest/fulcrum/compare/malclocke:master...i18n Whaddya think?
All for the use of respond_with
. The FlashResponder
is pretty neat, but I think it might be a bit overkill, dunno ... I assume if you set a flash in the controller the FlashResponder
won't overwrite it? If so then I guess it's pretty useful. What happens if no translation exists for the controller action? I'm generally wary of introducing 'magic', but this does look quite sensible.
I'll probably merge this in the next few days, I'm up to my neck in branch implementing comments at the moment.
No hurry, it still needs a bit of work anyway, was just wondering where this project was going to sit on the magic...ease of entry scale. About the FlashResponder I've set it up so that there's a fallback so as long as default create/update translations are added it should handle it just fine. And at the moment you need to set :flash => false to override the generated flash, but that's a simple change.
At the moment, all strings are hard coded in English. All strings should be abstracted out using Rails' i18n.