locomotive_cms 2.1.1 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ module Locomotive
3
3
 
4
4
  ## properties ##
5
5
  properties :name, :email, :locale
6
- properties :admin, :api_key, only_getter: true
6
+ property :admin, only_getter: true
7
7
 
8
8
  with_options only_setter: true do |presenter|
9
9
  presenter.properties :password, :password_confirmation
@@ -2,7 +2,7 @@
2
2
 
3
3
  - content_for :backbone_view_data do
4
4
  :plain
5
- account: #{escape_json @account.to_json.html_safe}
5
+ account: #{escape_json to_json(@account)}
6
6
 
7
7
  - content_for :submenu do
8
8
  = render_cell 'locomotive/settings_menu', :show
@@ -13,18 +13,18 @@
13
13
 
14
14
  %script{ type: 'text/javascript' }
15
15
  :plain
16
- window.Locomotive = { mounted_on: '#{Locomotive.mounted_on}' };
16
+ window.Locomotive = { mounted_on: '#{Locomotive.mounted_on}' }
17
17
 
18
18
  = stylesheet_link_tag 'locomotive/inline_editor', media: 'screen'
19
19
  = javascript_include_tag 'locomotive/inline_editor'
20
20
 
21
21
  %script{ type: 'text/javascript' }
22
22
  :plain
23
- window.locale = '#{I18n.locale}';
24
- window.content_locale = '#{::Mongoid::Fields::I18n.locale}';
23
+ window.locale = '#{I18n.locale}';
24
+ window.content_locale = '#{::Mongoid::Fields::I18n.locale}';
25
25
 
26
- Locomotive.current_site = new Locomotive.Models.Site(#{escape_json current_site.to_json.html_safe});
27
- Locomotive.current_account = new Locomotive.Models.Account(#{escape_json current_locomotive_account.to_json.html_safe});
26
+ window.Locomotive.current_site = new Locomotive.Models.Site(#{escape_json to_json(current_site)});
27
+ window.Locomotive.current_account = new Locomotive.Models.Account(#{escape_json to_json(current_locomotive_account)});
28
28
 
29
29
  $(document).ready(function() {
30
30
 
@@ -9,19 +9,19 @@
9
9
 
10
10
  %script{ type: 'text/javascript' }
11
11
  :plain
12
- window.Locomotive = { mounted_on: '#{Locomotive.mounted_on}' };
12
+ window.Locomotive = { mounted_on: '#{Locomotive.mounted_on}' }
13
13
 
14
14
  = stylesheet_link_tag 'locomotive', media: 'screen'
15
15
  = javascript_include_tag 'locomotive'
16
16
 
17
17
  %script{ type: 'text/javascript' }
18
18
  :plain
19
- window.locale = '#{I18n.locale}';
20
- window.content_locale = '#{::Mongoid::Fields::I18n.locale}';
21
- window.permalink_service_url = '#{Locomotive.mounted_on}/_permalink.json';
19
+ window.locale = '#{I18n.locale}';
20
+ window.content_locale = '#{::Mongoid::Fields::I18n.locale}';
21
+ window.permalink_service_url = '#{Locomotive.mounted_on}/_permalink.json';
22
22
 
23
- Locomotive.current_site = new Locomotive.Models.Site(#{escape_json current_site.to_presenter.as_json_for_html_view.to_json.html_safe});
24
- Locomotive.current_account = new Locomotive.Models.Account(#{escape_json current_locomotive_account.to_json.html_safe});
23
+ window.Locomotive.current_site = new Locomotive.Models.Site(#{escape_json to_json(current_site)});
24
+ window.Locomotive.current_account = new Locomotive.Models.Account(#{escape_json to_json(current_locomotive_account)});
25
25
 
26
26
  $(document).ready(function() {
27
27
 
@@ -49,7 +49,7 @@ module Locomotive
49
49
  # the "Page Not Found" page.
50
50
  #
51
51
  def render_no_page_error
52
- render template: 'locomotive/errors/no_page', layout: false, status: 404
52
+ render template: '/locomotive/errors/no_page', layout: false, status: 404, formats: [:html]
53
53
  end
54
54
 
55
55
  # Prepare and set the response object for the Locomotive page retrieved
@@ -1,3 +1,3 @@
1
1
  module Locomotive #:nodoc
2
- VERSION = '2.1.1'
2
+ VERSION = '2.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locomotive_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-07 00:00:00.000000000 Z
12
+ date: 2013-06-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -1373,7 +1373,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1373
1373
  version: '0'
1374
1374
  segments:
1375
1375
  - 0
1376
- hash: -869763622149797030
1376
+ hash: 2534107307124546099
1377
1377
  required_rubygems_version: !ruby/object:Gem::Requirement
1378
1378
  none: false
1379
1379
  requirements:
@@ -1382,7 +1382,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1382
1382
  version: '0'
1383
1383
  segments:
1384
1384
  - 0
1385
- hash: -869763622149797030
1385
+ hash: 2534107307124546099
1386
1386
  requirements: []
1387
1387
  rubyforge_project:
1388
1388
  rubygems_version: 1.8.23