Displaying 6 results from an estimated 6 matches for "public_path".
2006 Sep 05
1
Named routes and current_page? incompatibility
...l() method generated by a
named route does not default to only_path = true like url_for.
Therefore, the current_page? within link_to_unless_current() will not
match.
Apparently there is a recent alternative so that _path on all named
routes is also provided with _url. I tried this (e.g. using
public_path(...)) and got an undefined_method error. Does anyone know
what package this _path on named routes addition is in? Didn''t say on
the trouble ticket (http://dev.rubyonrails.org/ticket/4693).
I''m using InstantRails, so probably need to update some Rails
components.
Also, I have...
2005 Jun 26
4
calling controller and caching from a sweeper class
[cross-posting to rails and typo lists]
Hi,
I''m tinkering with the code for typo, a rails-based blog engine.
Typo has an XmlController with actions "rss" and "atom" which generate feed.xml
files, and it uses a caches_page declaration to cache the files that get
generated by those actions. It also has a Sweeper (Observer) class that expires
those cached files when a
2009 Oct 29
3
How to obtain the context path in a Jruby app on Tomcat?
Hi all,
I successfully deployed my JRuby on Rails app on Tomcat
In a jsp page I''d use ${pageContext.request.contextPath} to obtain my
context path.How could I do this in a Ruby controller?
Thanks
Rafael Roque
--
Posted via http://www.ruby-forum.com/.
2009 Feb 04
2
rendering error page for "Unauthorized" from before_filter
Hey all,
I am writing a plugin in which I want to stop the rendering of an
action with an unauthorized response if the user is not authorized to
view the resource. I am using a before filter to achieve this and
inside that before filter I do it like so:
render :text => "Unauthorized!", :status => :unauthorized, :layout
=> false
The status is properly set since I see the
2010 Jan 25
9
skinny Controllers, fat models with REST?
...html { render :action => "new" }
format.xml { render :xml => @task.errors, :status
=> :unprocessable_entity }
end
end
else
respond_to do |format| #BENUTZER HAT KEINE RECHTE subtask
anzulegen
format.html { render :file => "#{Rails.public_path}/
401.html", :status => :unauthorized } #401 page laden
format.xml { render :xml => @task.errors, :status
=> :unauthorized } #statuscode bearbeiten
end
end
end
greetings
LeonS
--
You received this message because you are subscribed to the Google Groups "...
2010 Jan 15
21
Dynamic Assets - can it be done?
I''m looking for 3 areas to work as dynamic assets:
image_path, javascript_path, and stylesheet_path
When I say dynamic, I mean that they will be dynamic through
controller/models. I have been working through approx. 12 hours of
searches to satisfy my answer to this question but am not finding much
luck.
The closest things I''ve found enabling this are use of config for assets