some updates for the widget
This commit is contained in:
parent
d83bd64c06
commit
e3cf299843
|
@ -15,7 +15,7 @@ class AnnouncementLinkWidgetsController < ApplicationController
|
||||||
}
|
}
|
||||||
f = File.join(Rails.root, "public" , "announcement_link_widget.json")
|
f = File.join(Rails.root, "public" , "announcement_link_widget.json")
|
||||||
if File.exists?(f)
|
if File.exists?(f)
|
||||||
contents = File.read('public/announcement_link_widget.json')
|
contents = File.read(f)
|
||||||
data = JSON.parse(contents)
|
data = JSON.parse(contents)
|
||||||
end
|
end
|
||||||
data
|
data
|
||||||
|
|
|
@ -63,7 +63,8 @@ namespace :announcement_link_widget do
|
||||||
"heading-links" => "Links"
|
"heading-links" => "Links"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File.open("public/announcement_link_widget.json","w") do |f|
|
file = File.join(Rails.root, "public" , "announcement_link_widget.json")
|
||||||
|
File.open(file,"w") do |f|
|
||||||
f.write(@data.to_json)
|
f.write(@data.to_json)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue