search for: access_level

Displaying 4 results from an estimated 4 matches for "access_level".

2006 Feb 11
7
Menu Helper
Hi all, I''m trying to add a common menu to all pages in my application. It is just a set of links I want to display. I''m having trouble deciding where to put the code. Below is what I''ve tried to get out of the "Four Days on Rails" tutorial but no luck. Any help would be appreciated. Am I on the right track? Thanks, Sam
2008 Jun 13
3
before_filter order of execution
Hi I''m trying to use before_filter to allow access to a site. Only logged in users can view any object in the controller, but only users with a access_level higher than 2 can view specific objects. My code is: ----------------------------------------------------------- IN USER_CONTROLLER before_filter :login_required before_filter :access_granted, :only => [:destroy, :new , :edit] IN APPLICATION.RB def logged_in? ! @current_user.blank? e...
2006 May 09
2
User.new doesn´t capture all of the parameters
...t; The database looks like this: create table users ( id int not null auto_increment, name varchar(100) not null, company varchar(100) not null, ownnumber int not null, sendt int not null, count int not null, msg_limit int not null, access_level varchar(50) not null, hashed_password char(40) not null, primary key (id) ); login_controller.rb: def add_user if request.get? @user = User.new else @user.company = (params[:user][:company]) # Tried first without this line, since I didn?t see any for name and p...
2012 Jul 17
24
Static Pages from Railcast
Hi everyone, I need several pages to be static but also modify when requested. I try following the railcast from Ryan at http://railscasts.com/episodes/117-semi-static-pages?view=comments Here what I have done!! rails g scaffold Pages name:string permanentlink:string title:string author:string access_level:string is_published:boolean meta_description:string meta_keyword:string meta_author:string content:text route.db get ''static/:permanentlink'', :controller => ''pages'', :action =>''show'' show.html.erb <p id="notice"><%= n...