refinerycms 0.9.8.8 → 0.9.8.9

Sign up to get free protection for your applications and to get access to all the features.
data/changelog.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.9.8.9 [21 December 2010]
2
+ * Fixed error in the inquiries engine seeds. [Philip Arndt](https://github.com/parndt)
3
+ * Separate each error message into its own ``<li>``. [Uģis Ozols](https://github.com/ugisozols)
4
+ * Add ``rescue_not_found`` option to turn on/off 404 rendering. [Ryan Bigg](https://github.com/radar)
5
+ * Add ``:from`` key to ``UserMailer`` for password reset. [Earle Clubb](https://github.com/eclubb)
6
+ * [See full list](https://github.com/resolve/refinerycms/compare/0.9.8.8...0.9.8.9)
7
+
1
8
  ## 0.9.8.8 [16 December 2010]
2
9
  * Prevented RefinerySetting from accessing its database table before it is created. [Philip Arndt](https://github.com/parndt)
3
10
  * Added more options to ``bin/refinerycms`` like ability to specify database username and password. [Philip Arndt](https://github.com/parndt)
@@ -23,3 +23,6 @@ Refinery::Application.configure do
23
23
  # Print deprecation notices to the Rails logger
24
24
  config.active_support.deprecation = :log
25
25
  end
26
+
27
+ # Don't handle some exceptions with the 404 page.
28
+ Refinery.rescue_not_found = false
@@ -55,3 +55,6 @@ end
55
55
  # instead of the default file system for resources and images
56
56
  # Make sure to your bucket info is correct in amazon_s3.yml
57
57
  Refinery.s3_backend = !(ENV['S3_KEY'].nil? || ENV['S3_SECRET'].nil?)
58
+
59
+ # Handle some exceptions with the 404 page.
60
+ Refinery.rescue_not_found = true
@@ -33,3 +33,6 @@ Refinery::Application.configure do
33
33
  # Print deprecation notices to the stderr <-- :log until authlogic calms down.
34
34
  config.active_support.deprecation = :log
35
35
  end
36
+
37
+ # Don't handle some exceptions with the 404 page.
38
+ Refinery.rescue_not_found = false
@@ -1,4 +1,4 @@
1
- page_position = Page.maximum(:position, :conditions => {:parent_id => nil})
1
+ page_position = (Page.maximum(:position, :conditions => {:parent_id => nil}) || -1)
2
2
 
3
3
  contact_us_page = Page.create(:title => "Contact",
4
4
  :link_url => "/contact",
@@ -5,6 +5,12 @@ class UserMailer < ActionMailer::Base
5
5
  subject I18n.translate('user_mailer.link_to_reset_your_password')
6
6
  @url = reset_users_url(:host => request.host_with_port,
7
7
  :reset_code => user.perishable_token)
8
+
9
+ domain = request.domain(RefinerySetting.find_or_set(:tld_length, 1))
10
+
11
+ mail(:to => user.email,
12
+ :subject => I18n.translate('user_mailer.link_to_reset_your_password'),
13
+ :from => "\"#{RefinerySetting[:site_name]}\" <no-reply@#{domain}>")
8
14
  end
9
15
 
10
16
  protected
@@ -3,12 +3,12 @@
3
3
  <p><%= t('.problems_in_following_fields') %>:</p>
4
4
  <ul>
5
5
  <% unless defined?(include_object_name) and include_object_name %>
6
- <% object.errors.each_value do |msg| %>
7
- <li><%= msg %></li>
6
+ <% object.errors.each do |key, value| %>
7
+ <li><%= value %></li>
8
8
  <% end %>
9
9
  <% else %>
10
- <% object.errors.full_messages.each do |msg| %>
11
- <li><%= msg %></li>
10
+ <% object.errors.full_messages.each do |value| %>
11
+ <li><%= value %></li>
12
12
  <% end %>
13
13
  <% end %>
14
14
  </ul>
@@ -27,10 +27,12 @@ module Refinery::ApplicationController
27
27
  c.send :after_filter, :store_current_location!,
28
28
  :if => Proc.new {|c| c.send(:refinery_user?) rescue false }
29
29
 
30
- c.send :rescue_from, ActiveRecord::RecordNotFound,
31
- ActionController::UnknownAction,
32
- ActionView::MissingTemplate,
33
- :with => :error_404
30
+ if Refinery.rescue_not_found
31
+ c.send :rescue_from, ActiveRecord::RecordNotFound,
32
+ ActionController::UnknownAction,
33
+ ActionView::MissingTemplate,
34
+ :with => :error_404
35
+ end
34
36
  end
35
37
  end
36
38
 
@@ -5,7 +5,7 @@ module Refinery
5
5
  WINDOWS = !!(RbConfig::CONFIG["host_os"] =~ %r!(msdos|mswin|djgpp|mingw)!)
6
6
 
7
7
  class << self
8
- attr_accessor :root, :s3_backend, :base_cache_key
8
+ attr_accessor :root, :s3_backend, :base_cache_key, :rescue_not_found
9
9
 
10
10
  def root
11
11
  @root ||= Pathname.new(File.expand_path(__FILE__).split('vendor').first.to_s)
@@ -19,6 +19,10 @@ module Refinery
19
19
  @base_cache_key ||= "refinery"
20
20
  end
21
21
 
22
+ def rescue_not_found
23
+ !!@rescue_not_found
24
+ end
25
+
22
26
  def version
23
27
  ::Refinery::Version.to_s
24
28
  end
@@ -28,7 +32,7 @@ module Refinery
28
32
  @major = 0
29
33
  @minor = 9
30
34
  @tiny = 8
31
- @build = 8
35
+ @build = 9
32
36
 
33
37
  class << self
34
38
  attr_reader :major, :minor, :tiny, :build
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 9
8
8
  - 8
9
- - 8
10
- version: 0.9.8.8
9
+ - 9
10
+ version: 0.9.8.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Resolve Digital
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-12-16 00:00:00 +13:00
20
+ date: 2010-12-21 00:00:00 +13:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency