Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of https://github.com/KarlHochfilzer/CBA

  • Loading branch information...
commit 75c5936488d2f15669db4f5353074de76462150a 2 parents 3281088 + 07401d5
@iboard authored
View
2  app/controllers/pages_controller.rb
@@ -13,7 +13,7 @@ class PagesController < ApplicationController
# GET /pages
# GET /pages.xml
def index
- @pages = scoped_pages.order([:menu_order,:asc],[:created_at, :desc]).all.paginate(
+ @pages = scoped_pages.order_by([:menu_order,:asc],[:created_at, :desc]).all.paginate(
:page => params[:page],
:per_page => APPLICATION_CONFIG[:pages_per_page] || 5
)
View
1  app/views/authentications/index.haml
@@ -22,6 +22,7 @@
%p.clear
%br
+= yield(:service_title)
= render :partial => '/authentications/authentications'
View
5 lib/content_items/interpreter.rb
@@ -143,9 +143,10 @@ def render_object_component(idx)
end
def embed_youtube_playlist(youtube_tag)
- "<iframe width='560' height='345' src='http://www.youtube.com/p/" +
+ youtube_tag = "PL" + youtube_tag if youtube_tag.length == 16
+ "<iframe width='560' height='345' src='http://www.youtube.com/embed/videoseries?list=" +
youtube_tag +
- "?version=3&amp;hl=en_US' frameborder='0' allowfullscreen=''></iframe>"
+ "&amp;hl=en_US' frameborder='0' allowfullscreen=''></iframe>"
end
def embed_youtube_video(youtube_tag)
View
6 spec/requests/youtube_render_spec.rb
@@ -6,12 +6,12 @@
cleanup_database
create_default_userset
@expected_video = Regexp.new Regexp.escape('<iframe width="420" height="345" src="http://www.youtube.com/embed/Ynp-_pvoNAk" frameborder="0" allowfullscreen=""></iframe>')
- @expected_playlist = Regexp.new Regexp.escape('<iframe width="560" height="345" src="http://www.youtube.com/p/79963DC001C316A6?version=3&amp;hl=en_US" frameborder="0" allowfullscreen=""></iframe>')
+ @expected_playlist = Regexp.new Regexp.escape('<iframe width="560" height="345" src="http://www.youtube.com/embed/videoseries?list=PL79963DC001C316A6&amp;hl=en_US" frameborder="0" allowfullscreen=""></iframe>')
end
it "should be rendered within pages" do
_page = Page.create(title: 'Test Video Embedding',
- body: "Play Video YOUTUBE:Ynp-_pvoNAk</p> here \nand a Playlist YOUTUBE_PLAYLIST:79963DC001C316A6</p>",
+ body: "Play Video YOUTUBE:Ynp-_pvoNAk</p> here \nand a Playlist YOUTUBE_PLAYLIST:PL79963DC001C316A6</p>",
user_id: User.first.id, is_draft: false, is_template: false)
visit page_path(_page.id)
assert page.html.should match @expected_video
@@ -21,7 +21,7 @@
it "should be rendered within postings" do
blog = Blog.create title: 'News', is_draft: false
posting = blog.postings.create title: 'For user only',
- body: "Play Video YOUTUBE:Ynp-_pvoNAk</p> here and a Playlist YOUTUBE_PLAYLIST:79963DC001C316A6</p>",
+ body: "Play Video YOUTUBE:Ynp-_pvoNAk</p> here and a Playlist YOUTUBE_PLAYLIST:PL79963DC001C316A6</p>",
is_draft: false, user: User.first
visit posting_path(posting)
assert page.html.should match @expected_video
Please sign in to comment.
Something went wrong with that request. Please try again.