20 lines
375 B
Ruby
20 lines
375 B
Ruby
class TextMarqueesController < ApplicationController
|
|
|
|
def widget
|
|
subpart = OrbitHelper.get_current_widget
|
|
marquee = Marquee.find(OrbitHelper.widget_custom_value)
|
|
texts = marquee.marquee_texts.collect do |mqt|
|
|
{
|
|
"text" => mqt.title,
|
|
"url" => mqt.url
|
|
}
|
|
end
|
|
{
|
|
"texts" => texts,
|
|
"extras" => {
|
|
"subpart-id" => subpart.id.to_s
|
|
}
|
|
}
|
|
end
|
|
|
|
end |