Commit 163d7b83b547e725c0cda92ffb9125844a8c1a28
1 parent
4e9672e7
Exists in
master
and in
22 other branches
change default return value
Showing
3 changed files
with
3 additions
and
3 deletions
Show diff stats
app/controllers/embed_controller.rb
@@ -4,7 +4,7 @@ class EmbedController < ApplicationController | @@ -4,7 +4,7 @@ class EmbedController < ApplicationController | ||
4 | block = Block.find(params[:id]) | 4 | block = Block.find(params[:id]) |
5 | source = params[:source] | 5 | source = params[:source] |
6 | 6 | ||
7 | - if !block.visible? | 7 | + if !block.embedable? || !block.visible? |
8 | render :template => 'shared/embed_denied.rhtml', :status => 403, :layout => "embed" | 8 | render :template => 'shared/embed_denied.rhtml', :status => 403, :layout => "embed" |
9 | else | 9 | else |
10 | locals = {:source => source, :block => block} | 10 | locals = {:source => source, :block => block} |
app/models/block.rb
@@ -17,7 +17,7 @@ class Block < ActiveRecord::Base | @@ -17,7 +17,7 @@ class Block < ActiveRecord::Base | ||
17 | named_scope :enabled, :conditions => { :enabled => true } | 17 | named_scope :enabled, :conditions => { :enabled => true } |
18 | 18 | ||
19 | def embedable? | 19 | def embedable? |
20 | - true | 20 | + false |
21 | end | 21 | end |
22 | 22 | ||
23 | def embed_code(url) | 23 | def embed_code(url) |
app/views/shared/embed_denied.rhtml