Method: Page.with_url
- Defined in:
- app/models/page.rb
.with_url(request, params) ⇒ Object
190 191 192 193 194 195 |
# File 'app/models/page.rb', line 190 def with_url(request, params) url = request.fullpath url.gsub!(/\?.*/, '') # Strip away anything after the ? as it's not needed where(["pages.permalink = ? or url = ? or (controller = ? and action = ?)", params[:permalink], url, params[:controller], params[:action]]) end |