fixed frontend controller method.
This commit is contained in:
parent
c5457e08d6
commit
a0e12f5a83
|
@ -1,20 +1,21 @@
|
||||||
class AdBannersController < ApplicationController
|
class AdBannersController < ApplicationController
|
||||||
def widget
|
def widget
|
||||||
adbanners = Banner.all
|
adbanner = Banner.first
|
||||||
banner = adbanners.collect do |b|
|
images = adbanner.ad_images.collect do |b|
|
||||||
{
|
{
|
||||||
"ad_fx" => b.ad_fx,
|
"ad_fx" => adbanner.ad_fx,
|
||||||
"height" => b.body,
|
"height" => adbanner.height,
|
||||||
"wight" => b.weight,
|
"width" => adbanner.width,
|
||||||
"speed" => b.speed,
|
"speed" => adbanner.speed,
|
||||||
"title" => b.title,
|
"title" => adbanner.title,
|
||||||
"timeout" => b.timeout,
|
"timeout" => adbanner.timeout,
|
||||||
|
"image_link" => b.file.url,
|
||||||
"more" => "More"
|
"more" => "More"
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
{
|
{
|
||||||
"extras" => {},
|
"extras" => {},
|
||||||
"data" => banner
|
"data" => images
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue