search for: pages_path

Displaying 3 results from an estimated 3 matches for "pages_path".

Did you mean: pages_patch
2009 Apr 29
7
problem with nil.user
...ex view: <% if is_logged_in? and logged_in_user.has_role?(''Moderator'') -%> <%= link_to ''Administer Users'', :controller => ''user'', :action => ''show'' %> <%= link_to '' | Edit pages'', pages_path %> <% end %> application helper: def is_logged_in? @logged_in_user = User.find(session[:user_id]) @logged_in_user ? @logged_in_user : false end def logged_in_user return @logged_in_user if is_logged_in? How could I change the code to rectify this? Any help would b...
2008 Aug 27
6
Restful routes
Hi, I''m pretty new to the concept of restful routing and am struggling to find any rails 2 info that helps with what I''m looking for. I have a regular scaffold setup and the routes are setup as default map.resources :pages I would like to be able to use titles in the url rather than relying on the id. Eg localhost:3000/pages/sometitle instead of just localhost:3000/pages/1
2012 Jul 17
24
Static Pages from Railcast
...w'' show.html.erb <p id="notice"><%= notice %></p> <p> <%= @page.title %> </p> <p> <%= @page.content %> </p> <%= link_to ''Edit'', edit_page_path(@page) %> | <%= link_to ''Back'', pages_path %> controller#show.rb def show if params[:permanentlink] @page = Page.find_by_permanentlink(params[:permanentlink]) else @page = Page.find(params[:id]) end respond_to do |format| format.html # show.html.erb format.json { render json: @page } end end The err...