Permalink
Browse files

Renamed RefinerySetting to Refinery::Setting. Might have missed a few.

  • Loading branch information...
1 parent cf7b8a4 commit e4f4326e2857586e1e63bbd2ab394e38444d24bb @parndt parndt committed May 22, 2011
Showing with 331 additions and 330 deletions.
  1. +2 −2 Gemfile.lock
  2. +2 −2 authentication/app/controllers/refinery/admin/users_controller.rb
  3. +3 −3 authentication/app/controllers/refinery/registrations_controller.rb
  4. +3 −3 authentication/app/controllers/refinery/users_controller.rb
  5. +2 −2 authentication/app/mailers/refinery/user_mailer.rb
  6. +1 −1 authentication/app/views/refinery/admin/users/_form.html.erb
  7. +1 −0 changelog.md
  8. +1 −1 core/app/controllers/refinery/admin/dialogs_controller.rb
  9. +1 −1 core/app/controllers/refinery/admin/refinery_core_controller.rb
  10. +2 −2 core/app/views/refinery/admin/_head.html.erb
  11. +1 −1 core/app/views/refinery/admin/_javascripts.html.erb
  12. +2 −2 core/app/views/refinery/wymiframe.html.erb
  13. +1 −1 core/app/views/shared/_footer.html.erb
  14. +1 −1 core/app/views/shared/_google_analytics.html.erb
  15. +2 −2 core/app/views/shared/_head.html.erb
  16. +1 −1 core/app/views/shared/_header.html.erb
  17. +1 −1 core/app/views/shared/_ie6check.html.erb
  18. +2 −2 core/app/views/shared/_menu.html.erb
  19. +1 −1 core/app/views/shared/_site_bar.html.erb
  20. +1 −1 core/config/locales/it.yml
  21. +1 −1 core/lib/refinery/admin/base_controller.rb
  22. +1 −1 core/lib/refinery/helpers/head_helper.rb
  23. +2 −2 core/lib/refinery/helpers/meta_helper.rb
  24. +2 −2 core/lib/refinery/helpers/script_helper.rb
  25. +1 −1 core/lib/tasks/doc.rake
  26. +1 −1 core/lib/tasks/yard.rake
  27. +3 −3 dashboard/app/controllers/refinery/admin/dashboard_controller.rb
  28. +1 −1 dashboard/app/helpers/refinery/admin/dashboard_helper.rb
  29. +1 −1 dashboard/app/views/refinery/admin/dashboard/index.html.erb
  30. +4 −4 db/migrate/20100913234710_create_refinerycms_settings_schema.rb
  31. +4 −4 db/migrate/20100926142529_add_value_type_to_refinery_settings.rb
  32. +1 −1 db/migrate/20110117053357_remove_duplicate_user_image_sizes_setting.rb
  33. +1 −1 doc/settings.md
  34. +1 −1 images/app/controllers/refinery/admin/images_controller.rb
  35. +4 −4 images/app/helpers/refinery/admin/images_helper.rb
  36. +1 −1 images/app/models/refinery/image.rb
  37. +2 −2 images/lib/refinery/images/dragonfly.rb
  38. +2 −2 images/spec/models/image_spec.rb
  39. +1 −1 pages/app/controllers/refinery/admin/page_parts_controller.rb
  40. +1 −1 pages/app/controllers/refinery/admin/pages_controller.rb
  41. +1 −1 pages/app/controllers/refinery/admin/pages_dialogs_controller.rb
  42. +4 −4 pages/app/models/refinery/page.rb
  43. +2 −2 pages/app/views/refinery/admin/pages/_form.html.erb
  44. +1 −1 pages/app/views/refinery/admin/pages/_form_page_parts.html.erb
  45. +1 −1 pages/app/views/refinery/admin/pages/index.html.erb
  46. +1 −1 pages/config/locales/ru.yml
  47. +1 −1 pages/features/step_definitions/page_steps.rb
  48. +2 −2 pages/spec/models/page_spec.rb
  49. +1 −1 public/javascripts/translations.js
  50. +1 −1 resources/app/views/refinery/admin/resources/_form.html.erb
  51. +1 −1 resources/lib/refinery/resources/dragonfly.rb
  52. +15 −15 settings/app/controllers/refinery/admin/{refinery_settings_controller.rb → settings_controller.rb}
  53. +0 −29 settings/app/helpers/refinery/admin/refinery_settings_helper.rb
  54. +29 −0 settings/app/helpers/refinery/admin/settings_helper.rb
  55. +3 −3 settings/app/models/refinery/{refinery_setting.rb → setting.rb}
  56. +0 −23 settings/app/views/refinery/admin/refinery_settings/_refinery_setting.html.erb
  57. +0 −5 settings/app/views/refinery/admin/refinery_settings/_refinery_settings.html.erb
  58. +2 −2 settings/app/views/refinery/admin/{refinery_settings → settings}/_actions.html.erb
  59. +15 −15 settings/app/views/refinery/admin/{refinery_settings → settings}/_form.html.erb
  60. +3 −3 settings/app/views/refinery/admin/{refinery_settings → settings}/_records.html.erb
  61. +23 −0 settings/app/views/refinery/admin/settings/_setting.html.erb
  62. +5 −0 settings/app/views/refinery/admin/settings/_settings.html.erb
  63. 0 settings/app/views/refinery/admin/{refinery_settings → settings}/edit.html.erb
  64. 0 settings/app/views/refinery/admin/{refinery_settings → settings}/index.html.erb
  65. 0 settings/app/views/refinery/admin/{refinery_settings → settings}/new.html.erb
  66. +4 −4 settings/config/locales/cs.yml
  67. +4 −4 settings/config/locales/da.yml
  68. +4 −4 settings/config/locales/de.yml
  69. +4 −4 settings/config/locales/el.yml
  70. +4 −4 settings/config/locales/en.yml
  71. +4 −4 settings/config/locales/es.yml
  72. +4 −4 settings/config/locales/fi.yml
  73. +4 −4 settings/config/locales/fr.yml
  74. +2 −2 settings/config/locales/it.yml
  75. +4 −4 settings/config/locales/jp.yml
  76. +4 −4 settings/config/locales/lolcat.yml
  77. +4 −4 settings/config/locales/lt.yml
  78. +4 −4 settings/config/locales/lv.yml
  79. +4 −4 settings/config/locales/nb.yml
  80. +4 −4 settings/config/locales/nl.yml
  81. +4 −4 settings/config/locales/pl.yml
  82. +4 −4 settings/config/locales/pt-BR.yml
  83. +4 −4 settings/config/locales/rs.yml
  84. +4 −4 settings/config/locales/ru.yml
  85. +4 −4 settings/config/locales/sk.yml
  86. +4 −4 settings/config/locales/sl.yml
  87. +4 −4 settings/config/locales/sv.yml
  88. +4 −4 settings/config/locales/vi.yml
  89. +4 −4 settings/config/locales/zh-CN.yml
  90. +4 −4 settings/config/locales/zh-TW.yml
  91. +2 −2 settings/config/routes.rb
  92. +3 −3 settings/db/migrate/20100913234710_create_refinerycms_settings_schema.rb
  93. +2 −2 settings/db/migrate/20100926142529_add_value_type_to_refinery_settings.rb
  94. +3 −3 settings/features/step_definitions/setting_steps.rb
  95. +1 −1 settings/features/support/paths.rb
  96. +2 −2 settings/lib/refinerycms-settings.rb
  97. +16 −16 settings/refinerycms-settings.gemspec
  98. +27 −27 settings/spec/models/refinery_setting_spec.rb
View
@@ -1,6 +1,6 @@
GIT
remote: git://github.com/resolve/refinerycms-i18n
- revision: 4d5e3c2ccec29885c127b0a762ff09c8417cae00
+ revision: b58e013eea2dc13c8a01bdef0e37fa232ca2edbb
branch: rails-3-1
specs:
refinerycms-i18n (1.1.0)
@@ -246,7 +246,7 @@ GEM
rubyzip
seo_meta (1.1.1)
refinerycms-generators (~> 1.0.1)
- sprockets (2.0.0.beta.5)
+ sprockets (2.0.0.beta.6)
hike (~> 1.0)
rack (~> 1.0)
tilt (~> 1.0)
@@ -23,7 +23,7 @@ def create
@user.plugins = @selected_plugin_names
# if the user is a superuser and can assign roles according to this site's
# settings then the roles are set with the POST data.
- unless current_user.has_role?(:superuser) and ::Refinery::RefinerySetting.find_or_set(:superuser_can_assign_roles, false)
+ unless current_user.has_role?(:superuser) and ::Refinery::Setting.find_or_set(:superuser_can_assign_roles, false)
@user.add_role(:refinery)
else
@user.roles = @selected_role_names.collect{|r| Role[r.downcase.to_sym]}
@@ -43,7 +43,7 @@ def edit
def update
# Store what the user selected.
@selected_role_names = params[:user].delete(:roles) || []
- unless current_user.has_role?(:superuser) and ::Refinery::RefinerySetting.find_or_set(:superuser_can_assign_roles, false)
+ unless current_user.has_role?(:superuser) and ::Refinery::Setting.find_or_set(:superuser_can_assign_roles, false)
@selected_role_names = @user.roles.collect{|r| r.title}
end
@selected_plugin_names = params[:user][:plugins]
@@ -38,11 +38,11 @@ def create
flash[:message] = "<h2>#{t('welcome', :scope => 'refinery.users.create', :who => @user.username).gsub(/\.$/, '')}.</h2>".html_safe
- site_name_setting = ::Refinery::RefinerySetting.find_or_create_by_name('site_name', :value => "Company Name")
+ site_name_setting = ::Refinery::Setting.find_or_create_by_name('site_name', :value => "Company Name")
if site_name_setting.value.to_s =~ /^(|Company\ Name)$/ or Role[:refinery].users.count == 1
flash[:message] << "<p>#{t('setup_website_name_html', :scope => 'refinery.users',
- :link => edit_refinery_admin_refinery_setting_path(site_name_setting, :dialog => true),
- :title => t('edit', :scope => 'refinery.admin.refinery_settings'))}</p>".html_safe
+ :link => edit_refinery_admin_setting_path(site_name_setting, :dialog => true),
+ :title => t('edit', :scope => 'refinery.admin.settings'))}</p>".html_safe
end
sign_in(@user)
redirect_back_or_default(refinery_admin_root_path)
@@ -38,11 +38,11 @@ def create
flash[:message] = "<h2>#{t('welcome', :scope => 'refinery.users.create', :who => @user.username).gsub(/\.$/, '')}.</h2>".html_safe
- site_name_setting = ::Refinery::RefinerySetting.find_or_create_by_name('site_name', :value => "Company Name")
+ site_name_setting = ::Refinery::Setting.find_or_create_by_name('site_name', :value => "Company Name")
if site_name_setting.value.to_s =~ /^(|Company\ Name)$/ or Role[:refinery].users.count == 1
flash[:message] << "<p>#{t('setup_website_name_html', :scope => 'refinery.users',
- :link => edit_refinery_admin_refinery_setting_path(site_name_setting, :dialog => true),
- :title => t('edit', :scope => 'admin.refinery_settings'))}</p>".html_safe
+ :link => edit_refinery_admin_setting_path(site_name_setting, :dialog => true),
+ :title => t('edit', :scope => 'refinery.admin.settings'))}</p>".html_safe
end
sign_in(@user)
redirect_back_or_default(refinery_admin_root_path)
@@ -6,11 +6,11 @@ def reset_notification(user, request)
@url = edit_user_password_url(:host => request.host_with_port,
:reset_password_token => @user.reset_password_token)
- domain = request.domain(::Refinery::RefinerySetting.find_or_set(:tld_length, 1))
+ domain = request.domain(::Refinery::Setting.find_or_set(:tld_length, 1))
mail(:to => user.email,
:subject => t('subject', :scope => 'user_mailer.reset_notification'),
- :from => "\"#{::Refinery::RefinerySetting[:site_name]}\" <no-reply@#{domain}>")
+ :from => "\"#{::Refinery::Setting[:site_name]}\" <no-reply@#{domain}>")
end
protected
@@ -49,7 +49,7 @@
</ul>
</div>
- <% if current_user.has_role?(:superuser) and ::Refinery::RefinerySetting.find_or_set(:superuser_can_assign_roles, false) %>
+ <% if current_user.has_role?(:superuser) and ::Refinery::Setting.find_or_set(:superuser_can_assign_roles, false) %>
<div class='field role_access'>
<span class='label_with_help'>
<%= f.label :role_access, t('.role_access'), :class => "title_label" %>
View
@@ -3,6 +3,7 @@
* Finally removed `Page#[]` in favour of `Page#content_for` so instead of `@page[:body]` it's `@page.content_for(:body)`. [Philip Arndt](https://github.com/parndt)
* Migrated to [Kaminari](https://github.com/amatsuda/kaminari) for pagination. [Uģis Ozols](https://github.com/ugisozols)
* Moved everything under Refinery namespace. [wakeless](https://github.com/wakeless)
+* Renamed `RefinerySetting` to `Refinery::Setting`. [Philip Arndt](https://github.com/parndt)
## 0.9.9.22 [22 May 2011]
@@ -25,4 +25,4 @@ def from_dialog?
end
end
-end
+end
@@ -11,4 +11,4 @@ def update_plugin_positions
end
end
end
-end
+end
@@ -2,7 +2,7 @@
<meta charset='<%= ::Refinery::Application.config.encoding %>' />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<%= yield :meta %>
- <title><%= ::Refinery::RefinerySetting.find_or_set(:site_name, 'Company Name') -%> - Refinery</title>
+ <title><%= ::Refinery::Setting.find_or_set(:site_name, 'Company Name') -%> - Refinery</title>
<%= csrf_meta_tag %>
<%= stylesheet_link_tag 'refinery/site_bar',
@@ -12,7 +12,7 @@
'refinery/tooltips',
'wymeditor/skins/refinery/skin',
:cache => ("cache/refinery" if Rails.root.writable? and
- ::Refinery::RefinerySetting.find_or_set(:use_resource_caching, true) and
+ ::Refinery::Setting.find_or_set(:use_resource_caching, true) and
request.env['HTTP_USER_AGENT'] !~ /MSIE/) -%>
<%= yield :stylesheets %>
@@ -1,5 +1,5 @@
<%
- js_caching = Rails.root.writable? and ::Refinery::RefinerySetting.find_or_set(:use_resource_caching, true)
+ js_caching = Rails.root.writable? and ::Refinery::Setting.find_or_set(:use_resource_caching, true)
login = login? unless defined?(login)
-%>
<%= yield :before_javascript_libraries -%>
@@ -5,8 +5,8 @@
<meta charset='<%= ::Refinery::Application.config.encoding %>' />
<meta httpequiv="XUACompatible" content="IE=edge,chrome=1" />
<%= stylesheet_link_tag "wymeditor/skins/refinery/wymiframe", :media => "all" %>
- <%= stylesheet_link_tag "formatting", :theme => ::Refinery::RefinerySetting.get(:theme).present?, :media => "all" %>
- <%= stylesheet_link_tag "refinery/theme" if ::Refinery::RefinerySetting.find_or_set(:frontend_refinery_stylesheets_enabled, true) %>
+ <%= stylesheet_link_tag "formatting", :theme => ::Refinery::Setting.get(:theme).present?, :media => "all" %>
+ <%= stylesheet_link_tag "refinery/theme" if ::Refinery::Setting.find_or_set(:frontend_refinery_stylesheets_enabled, true) %>
<%= stylesheet_link_tag "theme", :media => "all" %>
<%= javascript_include_tag 'modernizr-min' %>
</head>
@@ -1,4 +1,4 @@
<p>
<%= t('.copyright', :year => Time.now.year,
- :site_name => ::Refinery::RefinerySetting.find_or_set(:site_name, "Company Name")) %>
+ :site_name => ::Refinery::Setting.find_or_set(:site_name, "Company Name")) %>
</p>
@@ -1,5 +1,5 @@
<% unless refinery_user? or
- (page_code = ::Refinery::RefinerySetting.find_or_set(:analytics_page_code, 'UA-xxxxxx-x').to_s.strip) =~ /^(UA-xxxxxx-x)?$/ -%>
+ (page_code = ::Refinery::Setting.find_or_set(:analytics_page_code, 'UA-xxxxxx-x').to_s.strip) =~ /^(UA-xxxxxx-x)?$/ -%>
<!-- asynchronous google analytics: mathiasbynens.be/notes/async-analytics-snippet -->
<script>var _gaq=[['_setAccount','<%= page_code %>'],['_trackPageview'],['_trackPageLoadTime']];(function(d,t){
var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
@@ -4,12 +4,12 @@
<title><%= browser_title(yield(:title)) %></title>
<%= raw "<meta name=\"description\" content=\"#{@meta.meta_description}\" />" if @meta.meta_description.present? -%>
<%= raw "<meta name=\"keywords\" content=\"#{@meta.meta_keywords}\">" if @meta.meta_keywords.present? -%>
- <%= csrf_meta_tag if ::Refinery::RefinerySetting.find_or_set(:authenticity_token_on_frontend, true)-%>
+ <%= csrf_meta_tag if ::Refinery::Setting.find_or_set(:authenticity_token_on_frontend, true)-%>
<%= yield :meta %>
<%= stylesheet_link_tag stylesheets_for_head(stylesheets||=%w(application formatting theme), theme ||= nil),
:cache => ("cache/application" if Rails.root.writable? and
- ::Refinery::RefinerySetting.find_or_set(:use_resource_caching, true) and
+ ::Refinery::Setting.find_or_set(:use_resource_caching, true) and
request.env['HTTP_USER_AGENT'] !~ /MSIE/ and (theme ||= nil).blank?) %>
<%= stylesheet_link_tag "home", :theme => theme if home_page? %>
@@ -1,5 +1,5 @@
<h1 id='logo'>
- <%= link_to ::Refinery::RefinerySetting.find_or_set(:site_name, "Company Name"), root_path %>
+ <%= link_to ::Refinery::Setting.find_or_set(:site_name, "Company Name"), root_path %>
</h1>
<%= render(:partial => "/shared/menu", :locals => {
:dom_id => 'menu',
@@ -1,4 +1,4 @@
-<% if ::Refinery::RefinerySetting.find_or_set(:ie6_upgrade_message_enabled, true) -%>
+<% if ::Refinery::Setting.find_or_set(:ie6_upgrade_message_enabled, true) -%>
<% unless admin? %>
<!--[if lte IE 6]>
<div id="ie6msg_wrapper">
@@ -1,6 +1,6 @@
<%
dom_id ||= 'menu'
- caching = (cache_menu ||= ::Refinery::RefinerySetting.find_or_set(:cache_menu, false))
+ caching = (cache_menu ||= ::Refinery::Setting.find_or_set(:cache_menu, false))
cache_key = [Refinery.base_cache_key, 'pages_menus', dom_id, Globalize.locale].join('_')
# cache the generation of the menu based on the pages.
@@ -17,7 +17,7 @@
# Select top menu items unless 'roots' is supplied.
if roots.present?
css = [(css || 'menu'), 'clearfix'].flatten.join(' ')
- hide_children = ::Refinery::RefinerySetting.find_or_set(:menu_hide_children, false) if hide_children.nil?
+ hide_children = ::Refinery::Setting.find_or_set(:menu_hide_children, false) if hide_children.nil?
-%>
<nav id='<%= dom_id %>' class='<%= css %>'>
<ul>
@@ -15,7 +15,7 @@
<div id='site_bar_branding'>
<span id='site_bar_company_name'>
- <%= ::Refinery::RefinerySetting.find_or_set(:site_name, 'Company Name') %>
+ <%= ::Refinery::Setting.find_or_set(:site_name, 'Company Name') %>
</span>
<%= link_to t('.log_out', site_bar_translate_locale_args),
@@ -92,7 +92,7 @@ it:
image: immagine
inquiry: richiesta
resource: risorsa
- refinery_setting: impostazione di Refinery
+ setting: impostazione di Refinery
inquiry_setting: impostazione della richiesta
pagination:
next: "&raquo;"
@@ -61,7 +61,7 @@ def restrict_plugins
end
end
- Refinery::Plugins.set_active(plugins)
+ ::Refinery::Plugins.set_active(plugins)
end
def restrict_controller
@@ -4,7 +4,7 @@ module HeadHelper
def stylesheets_for_head(stylesheets, theme = false)
# you can disable the use of the built-in refinery stylesheets by disabling the setting.
- stylesheets.map! {|ss| ["refinery/#{ss}", ss] }.flatten! if ::Refinery::RefinerySetting.find_or_set(:frontend_refinery_stylesheets_enabled, true)
+ stylesheets.map! {|ss| ["refinery/#{ss}", ss] }.flatten! if ::Refinery::Setting.find_or_set(:frontend_refinery_stylesheets_enabled, true)
# if theme is set, use themed stylesheet links.
stylesheets.map! {|ss| ss =~ /^refinery\// ? ss : "/theme/stylesheets/#{ss}" } if theme
@@ -8,7 +8,7 @@ def browser_title(yield_title=nil)
[
(yield_title if yield_title.present?),
@meta.browser_title.present? ? @meta.browser_title : @meta.path,
- ::Refinery::RefinerySetting.find_or_set(:site_name, "Company Name")
+ ::Refinery::Setting.find_or_set(:site_name, "Company Name")
].compact.join(" - ")
end
@@ -17,7 +17,7 @@ def browser_title(yield_title=nil)
def page_title(options = {})
object = options.fetch(:object, @meta)
options.delete(:object)
- options = ::Refinery::RefinerySetting.find_or_set(:page_title, {
+ options = ::Refinery::Setting.find_or_set(:page_title, {
:chain_page_title => false,
:ancestors => {
:separator => " | ",
@@ -9,8 +9,8 @@ module ScriptHelper
def jquery_include_tags(options={})
# Merge in options
options = {
- :caching => (Rails.root.writable? and ::Refinery::RefinerySetting.find_or_set(:use_resource_caching, true)),
- :google => ::Refinery::RefinerySetting.find_or_set(:use_google_ajax_libraries, false),
+ :caching => (Rails.root.writable? and ::Refinery::Setting.find_or_set(:use_resource_caching, true)),
+ :google => ::Refinery::Setting.find_or_set(:use_google_ajax_libraries, false),
:jquery_ui => true
}.merge(options)
View
@@ -22,7 +22,7 @@ namespace :doc do
'vendor/engines/pages/**/*.rb',
'vendor/engines/refinery/**/*.rb',
'vendor/engines/refinery_dialogs/**/*.rb',
- 'vendor/engines/refinery_settings/**/*.rb',
+ 'vendor/engines/settings/**/*.rb',
'vendor/engines/resources/**/*.rb',
'vendor/engines/themes/**/*.rb',
'readme.md', 'license.md', 'vendor/engines/themes/readme.md')
View
@@ -16,7 +16,7 @@ begin
'pages/**/*.rb',
'refinery/**/*.rb',
'refinery_dialogs/**/*.rb',
- 'refinery_settings/**/*.rb',
+ 'settings/**/*.rb',
'resources/**/*.rb',
'-', 'License']
end
@@ -5,7 +5,7 @@ class DashboardController < ::Admin::BaseController
def index
@recent_activity = []
- Refinery::Plugins.active.each do |plugin|
+ ::Refinery::Plugins.active.each do |plugin|
begin
plugin.activity.each do |activity|
@recent_activity << activity.class.where(activity.conditions).
@@ -22,13 +22,13 @@ def index
@recent_activity = @recent_activity.flatten.compact.sort { |x,y|
y.updated_at <=> x.updated_at
- }.first(activity_show_limit=::Refinery::RefinerySetting.find_or_set(:activity_show_limit, 7))
+ }.first(activity_show_limit=::Refinery::Setting.find_or_set(:activity_show_limit, 7))
@recent_inquiries = defined?(Inquiry) ? Inquiry.latest(activity_show_limit) : []
end
def disable_upgrade_message
- ::Refinery::RefinerySetting.set(:show_internet_explorer_upgrade_message, {
+ ::Refinery::Setting.set(:show_internet_explorer_upgrade_message, {
:value => false,
:scoping => 'refinery'
})
@@ -23,4 +23,4 @@ def activity_message_for(record)
end
end
-end
+end
@@ -8,6 +8,6 @@
</aside>
</div>
<% if request.env["HTTP_USER_AGENT"] =~ /MSIE/ and
- ::Refinery::RefinerySetting.find_or_set(:show_internet_explorer_upgrade_message, true, :scoping => 'refinery') %>
+ ::Refinery::Setting.find_or_set(:show_internet_explorer_upgrade_message, true, :scoping => 'refinery') %>
<% flash.now[:message] = render(:partial => "/shared/ie6check") %>
<% end %>
@@ -1,7 +1,7 @@
class CreateRefinerycmsSettingsSchema < ActiveRecord::Migration
def self.up
- unless ::Refinery::RefinerySetting.table_exists?
- create_table ::Refinery::RefinerySetting.table_name, :force => true do |t|
+ unless ::Refinery::Setting.table_exists?
+ create_table ::Refinery::Setting.table_name, :force => true do |t|
t.string "name"
t.text "value"
t.boolean "destroyable", :default => true
@@ -12,12 +12,12 @@ def self.up
t.string "callback_proc_as_string"
end
- add_index ::Refinery::RefinerySetting.table_name, ["name"], :name => "index_#{::Refinery::RefinerySetting.table_name}_on_name"
+ add_index ::Refinery::Setting.table_name, ["name"], :name => "index_#{::Refinery::Setting.table_name}_on_name"
end
end
def self.down
- [::Refinery::RefinerySetting].reject{|m|
+ [::Refinery::Setting].reject{|m|
!(defined?(m) and m.respond_to?(:table_name))
}.each do |model|
drop_table model.table_name if model.table_exists?
@@ -1,13 +1,13 @@
class AddValueTypeToRefinerySettings < ActiveRecord::Migration
def self.up
- add_column ::Refinery::RefinerySetting.table_name, :form_value_type, :string
+ add_column ::Refinery::Setting.table_name, :form_value_type, :string
- ::Refinery::RefinerySetting.reset_column_information
+ ::Refinery::Setting.reset_column_information
end
def self.down
- remove_column ::Refinery::RefinerySetting.table_name, :form_value_type
+ remove_column ::Refinery::Setting.table_name, :form_value_type
- ::Refinery::RefinerySetting.reset_column_information
+ ::Refinery::Setting.reset_column_information
end
end
@@ -1,6 +1,6 @@
class RemoveDuplicateUserImageSizesSetting < ActiveRecord::Migration
def self.up
- if (settings = ::Refinery::RefinerySetting.where(:name => :user_image_sizes)).count > 1
+ if (settings = ::Refinery::Setting.where(:name => :user_image_sizes)).count > 1
default_value = { :small => '110x110>', :medium => '225x255>', :large => '450x450>' }
if (non_default_setting = settings.detect { |setting| setting[:value] != default_value })
View
@@ -53,7 +53,7 @@ until next year. This is what my ``application.html.erb`` file might look like:
<div id='header'>
<h1>My Company</h1>
- <% if ::Refinery::RefinerySetting.find_or_set(:show_trade_show_banner, false) %>
+ <% if ::Refinery::Setting.find_or_set(:show_trade_show_banner, false) %>
<%= image_tag ('trade-show-banner.jpg') %>
<% end %>
</div>
@@ -92,7 +92,7 @@ def init_dialog
def change_list_mode_if_specified
if action_name == 'index' and params[:view].present? and image_views.include?(params[:view].to_sym)
- ::Refinery::RefinerySetting.set(:preferred_image_view, params[:view])
+ ::Refinery::Setting.set(:preferred_image_view, params[:view])
end
end
Oops, something went wrong.

4 comments on commit e4f4326

Contributor

wenzowski replied Feb 16, 2012

It's probably worth stating in doc/settings.md at which release version ::Refinery::RefinerySetting.find_or_set changed to ::Refinery::Setting.find_or_set.

Owner

parndt replied Feb 16, 2012

It'll be 2.0 (as yet, unreleased.. but this month)

Contributor

wenzowski replied Feb 16, 2012

PS. A big thank-you for this project is definitely necessary.

Owner

parndt replied Feb 16, 2012

@wenzowski you are very welcome :-)

Please sign in to comment.