diff options
| author | hukl <contact@smyck.org> | 2009-02-19 22:40:27 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-02-19 22:40:27 +0100 |
| commit | 111829573d1c048d4c4c4e4d98b114eba9c28196 (patch) | |
| tree | 6f9d40764b0fd5a0587827f373db167be13f9ac2 /app/helpers/admin_helper.rb | |
| parent | 632b3a03d732ae735b2efd1999e14c649bf35b77 (diff) | |
adding the admin controller and his friends
Diffstat (limited to 'app/helpers/admin_helper.rb')
| -rw-r--r-- | app/helpers/admin_helper.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb new file mode 100644 index 0000000..7122584 --- /dev/null +++ b/app/helpers/admin_helper.rb | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | module AdminHelper | ||
| 2 | |||
| 3 | def language_selector | ||
| 4 | case I18n.locale | ||
| 5 | when :de | ||
| 6 | link_to 'Deutsch', edit_node_path(@node, :locale => :en) | ||
| 7 | when :en | ||
| 8 | link_to 'Deutsch', :locale => :de, :controller => params[:controller], :action => params[:action] | ||
| 9 | end | ||
| 10 | end | ||
| 11 | end \ No newline at end of file | ||
