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