zen 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. data/.gems +17 -15
  2. data/.gitignore +1 -1
  3. data/.travis.yml +1 -1
  4. data/MANIFEST +470 -0
  5. data/README.md +5 -3
  6. data/Rakefile +8 -6
  7. data/bin/zen +2 -7
  8. data/guide/asset_management.md +1 -0
  9. data/guide/autosaving_forms.md +1 -0
  10. data/guide/changelog.md +22 -0
  11. data/guide/faq.md +1 -0
  12. data/guide/getting_started.md +1 -0
  13. data/guide/hacking.md +1 -0
  14. data/guide/images/sections/revisions.png +0 -0
  15. data/guide/images/sections/revisions_diff.png +0 -0
  16. data/guide/images/sections/revisions_diff_multiple.png +0 -0
  17. data/guide/installation.md +4 -3
  18. data/guide/javascript.md +1 -0
  19. data/guide/javascript/zen_autosave.md +1 -0
  20. data/guide/javascript/zen_editor.md +1 -0
  21. data/guide/javascript/zen_form.md +1 -0
  22. data/guide/javascript/zen_hash.md +1 -0
  23. data/guide/javascript/zen_htmltable.md +1 -0
  24. data/guide/javascript/zen_tabs.md +1 -0
  25. data/guide/javascript/zen_window.md +1 -0
  26. data/guide/zen_compared.md +1 -0
  27. data/lib/zen.rb +10 -12
  28. data/lib/zen/event.rb +2 -2
  29. data/lib/zen/helper/controller.rb +13 -13
  30. data/lib/zen/helper/message.rb +3 -3
  31. data/lib/zen/helper/search.rb +4 -4
  32. data/lib/zen/helper/stacked_aspect.rb +9 -9
  33. data/lib/zen/html_diff.rb +151 -0
  34. data/lib/zen/language.rb +9 -7
  35. data/lib/zen/language/translation.rb +8 -8
  36. data/lib/zen/markup.rb +1 -1
  37. data/lib/zen/migrator.rb +2 -2
  38. data/lib/zen/model/helper.rb +4 -4
  39. data/lib/zen/model/plugin/events.rb +16 -16
  40. data/lib/zen/package.rb +2 -2
  41. data/lib/zen/package/all.rb +1 -1
  42. data/lib/zen/package/categories/lib/categories/controller/categories.rb +4 -4
  43. data/lib/zen/package/categories/lib/categories/controller/category_groups.rb +4 -4
  44. data/lib/zen/package/categories/lib/categories/helper/category.rb +3 -3
  45. data/lib/zen/package/categories/lib/categories/model/category.rb +9 -9
  46. data/lib/zen/package/categories/lib/categories/model/category_group.rb +9 -9
  47. data/lib/zen/package/comments/lib/comments/controller/comments.rb +4 -4
  48. data/lib/zen/package/comments/lib/comments/controller/comments_form.rb +2 -2
  49. data/lib/zen/package/comments/lib/comments/helper/comment.rb +1 -1
  50. data/lib/zen/package/comments/lib/comments/model/comment.rb +13 -13
  51. data/lib/zen/package/custom_fields/lib/custom_fields/blue_form_parameters.rb +1 -1
  52. data/lib/zen/package/custom_fields/lib/custom_fields/controller/custom_field_groups.rb +4 -4
  53. data/lib/zen/package/custom_fields/lib/custom_fields/controller/custom_field_types.rb +6 -6
  54. data/lib/zen/package/custom_fields/lib/custom_fields/controller/custom_fields.rb +5 -5
  55. data/lib/zen/package/custom_fields/lib/custom_fields/helper/custom_field.rb +3 -3
  56. data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field.rb +9 -9
  57. data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_group.rb +9 -9
  58. data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_type.rb +9 -9
  59. data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_value.rb +8 -3
  60. data/lib/zen/package/custom_fields/migrations/1336171490_revisions.rb +41 -0
  61. data/lib/zen/package/dashboard/lib/dashboard/controller/dashboard.rb +6 -6
  62. data/lib/zen/package/dashboard/lib/dashboard/model/widget.rb +3 -3
  63. data/lib/zen/package/dashboard/lib/dashboard/widget.rb +12 -12
  64. data/lib/zen/package/extensions/lib/extensions/controller/extensions.rb +3 -3
  65. data/lib/zen/package/menus/lib/menus/controller/menu_items.rb +5 -5
  66. data/lib/zen/package/menus/lib/menus/controller/menus.rb +4 -4
  67. data/lib/zen/package/menus/lib/menus/helper/menu.rb +4 -4
  68. data/lib/zen/package/menus/lib/menus/model/menu.rb +11 -11
  69. data/lib/zen/package/menus/lib/menus/model/menu_item.rb +10 -10
  70. data/lib/zen/package/menus/lib/menus/public/admin/menus/js/lib/nested_sortables.js +13 -13
  71. data/lib/zen/package/menus/lib/menus/public/admin/menus/js/menu_items.js +1 -1
  72. data/lib/zen/package/sections/lib/sections.rb +19 -0
  73. data/lib/zen/package/sections/lib/sections/controller/revisions.rb +184 -0
  74. data/lib/zen/package/sections/lib/sections/controller/section_entries.rb +5 -5
  75. data/lib/zen/package/sections/lib/sections/controller/sections.rb +9 -6
  76. data/lib/zen/package/sections/lib/sections/helper/revision.rb +124 -0
  77. data/lib/zen/package/sections/lib/sections/helper/section.rb +17 -15
  78. data/lib/zen/package/sections/lib/sections/helper/section_frontend.rb +104 -6
  79. data/lib/zen/package/sections/lib/sections/language/en/revisions.rb +34 -0
  80. data/lib/zen/package/sections/lib/sections/language/en/sections.rb +1 -0
  81. data/lib/zen/package/sections/lib/sections/language/nl/revisions.rb +35 -0
  82. data/lib/zen/package/sections/lib/sections/language/nl/sections.rb +1 -0
  83. data/lib/zen/package/sections/lib/sections/model/revision.rb +76 -0
  84. data/lib/zen/package/sections/lib/sections/model/section.rb +9 -9
  85. data/lib/zen/package/sections/lib/sections/model/section_entry.rb +47 -12
  86. data/lib/zen/package/sections/lib/sections/view/admin/revisions/index.xhtml +89 -0
  87. data/lib/zen/package/sections/lib/sections/view/admin/section-entries/form.xhtml +1 -1
  88. data/lib/zen/package/sections/lib/sections/view/admin/section-entries/index.xhtml +14 -0
  89. data/lib/zen/package/sections/migrations/1335711557_revisions.rb +40 -0
  90. data/lib/zen/package/settings/lib/settings/controller/settings.rb +12 -4
  91. data/lib/zen/package/settings/lib/settings/setting.rb +6 -6
  92. data/lib/zen/package/users/lib/users/controller/user_groups.rb +4 -4
  93. data/lib/zen/package/users/lib/users/controller/users.rb +12 -12
  94. data/lib/zen/package/users/lib/users/helper/access.rb +1 -1
  95. data/lib/zen/package/users/lib/users/helper/acl.rb +4 -4
  96. data/lib/zen/package/users/lib/users/helper/users.rb +2 -2
  97. data/lib/zen/package/users/lib/users/model/permission.rb +1 -1
  98. data/lib/zen/package/users/lib/users/model/user.rb +11 -11
  99. data/lib/zen/package/users/lib/users/model/user_group.rb +9 -9
  100. data/lib/zen/package/users/lib/users/model/user_status.rb +2 -2
  101. data/lib/zen/public/admin/zen/css/general.css +54 -0
  102. data/lib/zen/public/admin/zen/css/messages.css +6 -3
  103. data/lib/zen/public/admin/zen/css/tables.css +10 -0
  104. data/lib/zen/public/admin/zen/images/icons/undo.png +0 -0
  105. data/lib/zen/public/admin/zen/js/lib/autosave.js +8 -8
  106. data/lib/zen/public/admin/zen/js/lib/base.js +2 -2
  107. data/lib/zen/public/admin/zen/js/lib/events.js +2 -2
  108. data/lib/zen/public/admin/zen/js/lib/form.js +7 -7
  109. data/lib/zen/public/admin/zen/js/lib/hash.js +7 -7
  110. data/lib/zen/public/admin/zen/js/lib/tabs.js +3 -3
  111. data/lib/zen/public/admin/zen/js/lib/window.js +1 -1
  112. data/lib/zen/security.rb +2 -2
  113. data/lib/zen/spec/helper.rb +3 -9
  114. data/lib/zen/spec/helper/capybara.rb +4 -4
  115. data/lib/zen/spec/helper/general.rb +1 -1
  116. data/lib/zen/spec/simplecov.rb +1 -5
  117. data/lib/zen/task/build.rake +22 -16
  118. data/lib/zen/task/db.rake +3 -2
  119. data/lib/zen/task/spelling.rake +10 -10
  120. data/lib/zen/task/test.rake +27 -19
  121. data/lib/zen/theme.rb +6 -6
  122. data/lib/zen/version.rb +1 -1
  123. data/spec/zen/all.rb +4 -0
  124. data/spec/zen/package/sections/controller/revisions.rb +235 -0
  125. data/spec/zen/package/sections/model/revision.rb +76 -0
  126. data/zen.gemspec +23 -21
  127. metadata +88 -29
  128. data/lib/zen/model/methods.rb +0 -27
  129. data/lib/zen/task/clean.rake +0 -20
  130. data/lib/zen/task/setup.rake +0 -4
  131. data/pkg/.gitkeep +0 -0
data/README.md CHANGED
@@ -78,6 +78,7 @@ small portion of what it can do.
78
78
  * {Sections Sections & Section Entries}
79
79
  * {Sections::Controller::Sections Managing Sections}
80
80
  * {Sections::Controller::SectionEntries Managing Section Entries}
81
+ * {Sections::Controller::Revisions Managing And Restoring Revisions}
81
82
  * {Ramaze::Helper::SectionFrontend#get_entries Section Entries & Templates}
82
83
  * {Settings}
83
84
  * {Settings::Controller::Settings Managing Settings}
@@ -96,17 +97,18 @@ small portion of what it can do.
96
97
  * {Zen::Event Events}
97
98
  * {Zen::Validation Validating Objects}
98
99
  * {Zen::Security.sanitize Sanitizing User Input}
99
- * {file:autosaving_forms Automatically Saving Form Data}
100
100
  * {Ramaze::Helper::Locale Working With Dates}
101
- * {file:asset_management Asset Management}
102
101
  * {Zen::Markup Converting Markup}
102
+ * {Zen::HTMLDiff Generating Diffs}
103
+ * {file:autosaving_forms Automatically Saving Form Data}
104
+ * {file:asset_management Asset Management}
103
105
  * {file:javascript Javascript API}
104
106
 
105
107
  ## Community
106
108
 
107
109
  * [Website][zen website]
108
110
  * [Mailing list][mailing list]
109
- * IRC channel: \#zen-cms on Freenode
111
+ * IRC channel: \#zen on Freenode
110
112
 
111
113
  ## Websites Using Zen
112
114
 
data/Rakefile CHANGED
@@ -1,12 +1,14 @@
1
- require 'rubygems'
2
-
3
- Zen::Gemspec = Gem::Specification.load(
4
- File.expand_path('../zen.gemspec', __FILE__)
5
- )
1
+ require 'rubygems/package_task'
6
2
 
7
3
  task_path = File.expand_path('../lib/zen/task', __FILE__)
8
- tasks = ['build', 'clean', 'proto', 'setup', 'test', 'spelling']
4
+ tasks = ['build', 'proto', 'test', 'spelling']
5
+ GEMSPEC = Gem::Specification.load('zen.gemspec')
9
6
 
10
7
  tasks.each do |task|
11
8
  import File.join(task_path, "#{task}.rake")
12
9
  end
10
+
11
+ Gem::PackageTask.new(GEMSPEC) do |pkg|
12
+ pkg.need_tar = false
13
+ pkg.need_zip = false
14
+ end
data/bin/zen CHANGED
@@ -1,13 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'ramaze'
3
+ require 'shebang'
3
4
 
4
- Ramaze.setup(:verbose => false) do
5
- gem 'shebang', ['~> 0.1']
6
- end
7
-
8
- unless $LOAD_PATH.include?(__DIR__('../lib'))
9
- $LOAD_PATH.unshift(__DIR__('../lib'))
10
- end
5
+ $:.unshift(__DIR__('../lib')) unless $:.include?(__DIR__('../lib'))
11
6
 
12
7
  require 'zen/version'
13
8
  require 'zen/bin/create'
@@ -1,3 +1,4 @@
1
+ # @title Asset Management
1
2
  # Asset Management
2
3
 
3
4
  Zen comes with an asset manager powered by [Ramaze::Asset][ramaze-asset]. Before
@@ -1,3 +1,4 @@
1
+ # @title Automatically Saving Form Data
1
2
  # Automatically Saving Form Data
2
3
 
3
4
  To make it easier for users to work with their data Zen allows developers to
@@ -1,5 +1,27 @@
1
+ # @title Changelog
1
2
  # Changelog
2
3
 
4
+ ## 0.4.3 - June 10th, 2012
5
+
6
+ * Fixed various YARD warnings.
7
+ * Updated the version requirement of Rake.
8
+ * Simplified the loading of Gems.
9
+ * Added pg and mysql2 to the gemspec.
10
+ * Fixed the task for building Gems.
11
+ * Load specific Ramaze versions.
12
+ * Updated various version requirements.
13
+ * Expanded the documentation of `get_entries()`.
14
+ * Changed `@since` date formats to Y-m-d.
15
+ * Fixed a minor formatting issue for `get_entries()`.
16
+ * `:field_values` was renamed to `:custom_field_values`.
17
+ * Small style changes for messages.
18
+ * Removed `Sequel::Model.pk_hash`.
19
+ * Redirect to the dashboard for invalid searches.
20
+ * Re-organized some parts of the developer guide.
21
+ * Replaced Raspell with `FFI::Aspell`.
22
+ * Ability to compare section entry revisions and restore specific revisions.
23
+ * Escape underscores in Markdown text.
24
+
3
25
  ## 0.4.2 - April 16th, 2012
4
26
 
5
27
  * Bugfix for rendering menu items in the backend. Due to a typo the menu items
@@ -1,3 +1,4 @@
1
+ # @title Frequently Asked Questions
1
2
  # Frequently Asked Questions
2
3
 
3
4
  ## When starting I get the warning "Failed to migrate the settings..."
@@ -1,3 +1,4 @@
1
+ # @title Getting Started
1
2
  # Getting Started
2
3
 
3
4
  Once installed (see {file:installation Installation}) you can use the ``zen``
@@ -1,3 +1,4 @@
1
+ # @title Hacking & Contributing
1
2
  # Hacking & Contributing
2
3
 
3
4
  Everybody is free to contribute to Zen. However, to ensure that the quality of
@@ -1,3 +1,4 @@
1
+ # @title Installation
1
2
  # Installation
2
3
 
3
4
  Zen can be installed in two different ways, either by using Rubygems or Git. The
@@ -11,7 +12,7 @@ your terminal:
11
12
 
12
13
  $ gem install zen
13
14
 
14
- If you want to install a specific version of Zen you can provide the ``-v``
15
+ If you want to install a specific version of Zen you can provide the `-v`
15
16
  option:
16
17
 
17
18
  $ gem install zen -v [VERSION]
@@ -28,8 +29,8 @@ be done by a simply cloning the repository:
28
29
 
29
30
  $ git clone git://github.com/zen-cms/Zen-Core.git zen_core
30
31
 
31
- This command saves a local copy of Zen in the directory ./zen_core. Now that you
32
- have a local copy there are two ways of using it:
32
+ This command saves a local copy of Zen in the directory `./zen_core`. Now that
33
+ you have a local copy there are two ways of using it:
33
34
 
34
35
  1. Manually build the Gem each time you've made a change.
35
36
  2. Directly load the Zen installation from your application.
@@ -1,3 +1,4 @@
1
+ # @title Javascript API
1
2
  # Javascript API
2
3
 
3
4
  Zen comes with a pretty good Javascript API that's based on the
@@ -1,3 +1,4 @@
1
+ # @title Zen.Autosave
1
2
  # Zen.Autosave
2
3
 
3
4
  Zen.Autosave automatically saves form data at a given interval. Automatically
@@ -1,3 +1,4 @@
1
+ # @title Zen.Editor
1
2
  # Zen.Editor
2
3
 
3
4
  Zen.Editor is the main class used for the markup editor that can be used to more
@@ -1,3 +1,4 @@
1
+ # @title Zen.Form
1
2
  # Zen.Form
2
3
 
3
4
  Zen.Form is a class used for adding various dynamic features to HTML forms
@@ -1,3 +1,4 @@
1
+ # @title Zen.Hash
1
2
  # Zen.Hash
2
3
 
3
4
  Zen.Hash is a class that can be used to parse and generate shebang/hash bang
@@ -1,3 +1,4 @@
1
+ # @title Zen.HtmlTable
1
2
  # Zen.HtmlTable
2
3
 
3
4
  The class Zen.HtmlTable was introduced in Zen 0.2.8 and makes it possible to
@@ -1,3 +1,4 @@
1
+ # @title Zen.Tabs
1
2
  # Zen.Tabs
2
3
 
3
4
  Zen.Tabs can be used to create a tab based navigation menu. Because Zen already
@@ -1,3 +1,4 @@
1
+ # @title Zen.Window
1
2
  # Zen.Window
2
3
 
3
4
  The Window class can be used to display modal windows with (or without) a set of
@@ -1,3 +1,4 @@
1
+ # @title Comparing Zen With Others
1
2
  # Comparing Zen With Others
2
3
 
3
4
  A common question people ask when looking into specific software is "How is this
data/lib/zen.rb CHANGED
@@ -1,12 +1,10 @@
1
- require 'ramaze'
2
1
  require 'json'
3
-
4
- Ramaze.setup(:verbose => false) do
5
- gem 'sequel' , ['~> 3.34.1']
6
- gem 'bcrypt-ruby' , ['~> 3.0.1'], :lib => 'bcrypt'
7
- gem 'loofah' , ['~> 1.2.1']
8
- gem 'ramaze-asset', ['~> 0.2.3'], :lib => 'ramaze/asset'
9
- end
2
+ require 'ramaze'
3
+ require 'sequel'
4
+ require 'bcrypt'
5
+ require 'loofah'
6
+ require 'ramaze/asset'
7
+ require 'diff-lcs'
10
8
 
11
9
  $:.unshift(__DIR__) unless $:.include?(__DIR__)
12
10
 
@@ -21,7 +19,7 @@ module Zen
21
19
  # Array containing all the translations that should be made available to the
22
20
  # Javascript code.
23
21
  #
24
- # @since 19-02-2012
22
+ # @since 2012-02-19
25
23
  #
26
24
  JAVASCRIPT_TRANSLATIONS = [
27
25
  'zen_general.buttons.bold',
@@ -73,13 +71,12 @@ module Zen
73
71
  # Sets the database connection to use and loads the core packages provided
74
72
  # by Zen.
75
73
  #
76
- # @since 27-03-2012
74
+ # @since 2012-03-27
77
75
  #
78
76
  def database=(database)
79
77
  @database = database
80
78
 
81
79
  require 'zen/model/init'
82
- require 'zen/model/methods'
83
80
  require 'zen/package/all'
84
81
  end
85
82
 
@@ -87,7 +84,7 @@ module Zen
87
84
  # Prepares Zen for the party of its life.
88
85
  #
89
86
  # @since 0.3
90
- # @event post_start Event that is fired after all packages have been loaded,
87
+ # @event post\_start Event that is fired after all packages have been loaded,
91
88
  # the cache has been set up, etc. This event is called at the very end of
92
89
  # the method.
93
90
  #
@@ -213,6 +210,7 @@ require 'zen/package'
213
210
  require 'zen/theme'
214
211
  require 'zen/security'
215
212
  require 'zen/migrator'
213
+ require 'zen/html_diff'
216
214
 
217
215
  # Load all the base controllers
218
216
  require 'zen/controller/base_controller'
@@ -66,7 +66,7 @@ module Zen
66
66
  #
67
67
  # @since 0.3
68
68
  # @param [#to_sym] event The name of the event to invoke.
69
- # @param [Array] *args An array of arguments to pass to each event.
69
+ # @param [Array] args An array of arguments to pass to each event.
70
70
  #
71
71
  def call(event, *args)
72
72
  event = event.to_sym
@@ -105,7 +105,7 @@ module Zen
105
105
  # Zen::Event.delete(:before_new_user, :after_new_user)
106
106
  #
107
107
  # @since 0.3
108
- # @param [Array] *names The names of the events to remove. Each name
108
+ # @param [Array] names The names of the events to remove. Each name
109
109
  # should be a symbol or something that responds to #to_sym().
110
110
  #
111
111
  def delete(*names)
@@ -21,7 +21,7 @@ module Ramaze
21
21
  # Returns an anchor tag that points towards the URL that allows users to
22
22
  # manage collections of data.
23
23
  #
24
- # @since 17-12-2011
24
+ # @since 2011-12-17
25
25
  # @see Ramaze::Helper::Controller#edit_link
26
26
  # @return [String]
27
27
  #
@@ -33,7 +33,7 @@ module Ramaze
33
33
  # Returns an anchor tag that should point to a form that allows users to
34
34
  # edit certain resources.
35
35
  #
36
- # @since 17-12-2011
36
+ # @since 2011-12-17
37
37
  # @param [#to_s] url The URL for the link.
38
38
  # @param [#to_s] text The text to display in the link tag.
39
39
  # @return [String]
@@ -46,7 +46,7 @@ module Ramaze
46
46
  # Returns a button that should point to a form that allows users to create
47
47
  # new resources.
48
48
  #
49
- # @since 17-12-2011
49
+ # @since 2011-12-17
50
50
  # @see Ramaze::Helper::Controller#edit_link
51
51
  #
52
52
  def new_button(url, text)
@@ -56,7 +56,7 @@ module Ramaze
56
56
  ##
57
57
  # Returns a button that when clicked should delete a set of resources.
58
58
  #
59
- # @since 17-12-2011
59
+ # @since 2011-12-17
60
60
  # @param [String] text The text to display on the button.
61
61
  # @return [String]
62
62
  #
@@ -69,7 +69,7 @@ module Ramaze
69
69
  # Checks if a given object can be paginated and the page count is greater
70
70
  # than 1. If this is the case then the pagination links are displayed.
71
71
  #
72
- # @since 17-12-2011
72
+ # @since 2011-12-17
73
73
  # @param [Mixed] object
74
74
  # @return [String]
75
75
  #
@@ -84,7 +84,7 @@ module Ramaze
84
84
  # values can be returned:
85
85
  #
86
86
  # * firefox
87
- # * internet_explorer
87
+ # * internet\_explorer
88
88
  # * chrome
89
89
  # * safari
90
90
  # * other
@@ -92,7 +92,7 @@ module Ramaze
92
92
  # Note that this method does a very simple check and thus should not be
93
93
  # relied on for anything mission critical.
94
94
  #
95
- # @since 23-12-2011
95
+ # @since 2011-12-23
96
96
  # @param [String] agent String containing the user agent to check, set to
97
97
  # ``request.env['HTTP_USER_AGENT']`` if no custom agent is specified.
98
98
  # @return [String]
@@ -124,7 +124,7 @@ module Ramaze
124
124
  ##
125
125
  # Writes a JSON response.
126
126
  #
127
- # @since 13-02-2012
127
+ # @since 2012-02-13
128
128
  # @param [Mixed] data The response data.
129
129
  # @param [Fixnum] status The HTTP status code.
130
130
  #
@@ -136,8 +136,8 @@ module Ramaze
136
136
  # Returns a hash containing all the given POST fields, similar to
137
137
  # ``Innate::Request#subset``.
138
138
  #
139
- # @since 19-02-2012
140
- # @param [Array] *keys The POST keys to retrieve.
139
+ # @since 2012-02-19
140
+ # @param [Array] keys The POST keys to retrieve.
141
141
  # @return [Hash]
142
142
  #
143
143
  def post_fields(*keys)
@@ -150,7 +150,7 @@ module Ramaze
150
150
  # Returns a JSON string containing all the translations for the Javascript
151
151
  # code.
152
152
  #
153
- # @since 19-02-2012
153
+ # @since 2012-02-19
154
154
  # @return [String]
155
155
  #
156
156
  def javascript_translations
@@ -199,7 +199,7 @@ module Ramaze
199
199
  # end
200
200
  #
201
201
  # @since 0.3
202
- # @param [Array] *actions An array of action names to protect against
202
+ # @param [Array] actions An array of action names to protect against
203
203
  # CSRF attacks.
204
204
  #
205
205
  def csrf_protection(*actions)
@@ -231,7 +231,7 @@ module Ramaze
231
231
  # [:name, :description],
232
232
  # :edit_category_group
233
233
  #
234
- # @since 13-02-2012
234
+ # @since 2012-02-13
235
235
  # @param [Class] model The model to use for saving data.
236
236
  # @param [Array] columns The columns that can be saved.
237
237
  # @param [#to_sym] permission The permission required for saving
@@ -21,13 +21,13 @@ module Ramaze
21
21
  #
22
22
  # This will create and return the HTML for all the messages.
23
23
  #
24
- # @since 26-05-2011
24
+ # @since 2011-05-26
25
25
  #
26
26
  module Message
27
27
  ##
28
28
  # Adds a new message to the list for the given type.
29
29
  #
30
- # @since 26-05-2011
30
+ # @since 2011-05-26
31
31
  # @param [Symbol/String] type The type of message to store (e.g. "error").
32
32
  # @param [String] message The message to display.
33
33
  #
@@ -44,7 +44,7 @@ module Ramaze
44
44
  ##
45
45
  # Renders all the messages for the specified types.
46
46
  #
47
- # @since 26-05-2011
47
+ # @since 2011-05-26
48
48
  # @param [Array] types Array containing all the messages to render.
49
49
  #
50
50
  def display_messages(types = [:info, :error, :success])
@@ -4,13 +4,13 @@ module Ramaze
4
4
  # The Search helper is a helper that can be used in controllers allowing the
5
5
  # user to search the content of those controllers and models.
6
6
  #
7
- # @since 16-10-2011
7
+ # @since 2011-10-16
8
8
  #
9
9
  module Search
10
10
  ##
11
11
  # Renders a search form that points to the given URL.
12
12
  #
13
- # @since 16-10-2011
13
+ # @since 2011-10-16
14
14
  # @param [#to_s] url The URL to point the search form to.
15
15
  # @return [String]
16
16
  #
@@ -33,7 +33,7 @@ module Ramaze
33
33
  # Sections::Model::Section.search(query)
34
34
  # end
35
35
  #
36
- # @since 16-10-2011
36
+ # @since 2011-10-16
37
37
  # @return [NilClass|Mixed]
38
38
  #
39
39
  def search
@@ -46,7 +46,7 @@ module Ramaze
46
46
  rescue => e
47
47
  Ramaze::Log.error(e)
48
48
  message(:error, lang('zen_general.errors.invalid_search'))
49
- redirect_referrer(::Sections::Controller::Sections.r(:index))
49
+ redirect_referrer(Dashboard::Controller::Dashboard.r(:index))
50
50
  end
51
51
  end
52
52
  end # Search