From b6d443cb003565221f06432e1acd00662b13e68c Mon Sep 17 00:00:00 2001 From: Francisco Marcelo de Araújo Lima Júnior Date: Tue, 25 Feb 2014 19:45:21 -0300 Subject: [PATCH] adjust infra to embed track block --- app/controllers/embed_controller.rb | 2 +- app/views/layouts/embed.rhtml | 36 +++++++++++++----------------------- config/routes.rb | 2 +- 3 files changed, 15 insertions(+), 25 deletions(-) diff --git a/app/controllers/embed_controller.rb b/app/controllers/embed_controller.rb index 25ecf5f..2c5b004 100644 --- a/app/controllers/embed_controller.rb +++ b/app/controllers/embed_controller.rb @@ -1,6 +1,6 @@ class EmbedController < ApplicationController - def embed_block + def index block = Block.find(params[:id]) source = params[:source] diff --git a/app/views/layouts/embed.rhtml b/app/views/layouts/embed.rhtml index a7227d8..fd771a6 100644 --- a/app/views/layouts/embed.rhtml +++ b/app/views/layouts/embed.rhtml @@ -19,13 +19,19 @@ content.respond_to?(:call) ? content.call : content end.join("\n") %> - -
-
-
-
- <%= yield %> -
+
+
+
+
+
+
+
+
+ <%= yield %> +
+
+
+
@@ -37,21 +43,5 @@ }); - - - - diff --git a/config/routes.rb b/config/routes.rb index 7d07dc8..ed56c2e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -32,7 +32,7 @@ ActionController::Routing::Routes.draw do |map| map.connect 'user_themes/*stuff', :controller => 'not_found', :action => 'nothing' # embed controller - map.embed_block 'embed/block/:id', :controller => 'embed', :action => 'embed_block', :id => /.+/ + map.embed_block 'embed/block/:id', :controller => 'embed', :action => 'index', :id => /.+/ # online documentation map.doc 'doc', :controller => 'doc', :action => 'index' -- libgit2 0.21.2