Displaying 3 results from an estimated 3 matches for "publish_path".
Did you mean:
public_path
2006 Feb 12
6
Including another helper
I need to include another helper module apart from the normal two
(ApplicationHelper and [controllername]Helper). The inclusion needs to
be dynamic and based on external parameters (ie what helper that get
included differ from request to request).
Is it possible? How?
/Marcus
2006 Jun 26
7
Using Rails to Generate static pages
Hi all,
Has anyone ever thought about or implemented a way to use Rails to pull
content from a database and actually *generate* static html pages from view
templates?
I want to throw a bunch of content into a db using rails and then put all
my website templates into the views dir and write the files out with the
content inside.
The funny thing is that the html pages Rails normally outputs to
2006 Feb 08
0
Publish to static pages
I need to "publish" pages to static files (in order to transfer to a
server where Rails isn''t available, this is not for caching).
When I do:
require "open-uri"
def publish
File.open(publish_path, "w") do |file|
open(base_view_path) { |res| file.write(res.read) }
end
end
where publish() is a method on a model running in Rails (base_view_path
is a method returning an URL to the page to publish but in "view mode").
The problem here seems to be that Webric...