search for: site_admin

Displaying 6 results from an estimated 6 matches for "site_admin".

2006 Jul 11
0
Should I use exclamation marks for methods that change associations?
...Authorization plugin (http://www.writertopia.com/developers/authorization). Josh Susser suggested I use exclamation marks when I''m setting roles. The basic ways of setting roles uses the #has_role, #has_no_role, #accepts_role, and #accepts_no_role methods: user.has_role ''site_admin'' user.has_role ''moderator'', group user.has_no_role ''site_admin'' user.has_role ''member'', Group a_model.accepts_role ''moderator'', user a_model.accepts_no_role ''moderator...
2006 Feb 01
1
Combine Ajax call with an effect.
...;)">) so that the user has to click on the link to show the description, and then click on it again to hide the description. I just can''t get it to work by combining the ajax and the effect...Thanks for your help. function getDescription(news_id) { var url = ''/admin/site_admin/news_popup.lasso?news_id='' + news_id; var myDiv = new Ajax.Updater(''thedescription'', url, {asynchronous:true}); } <span class="shownames" id = "show"> <a href="#" title="" onmouseover="getDescription([field:...
2007 Oct 15
6
SQL injection with :order, :limit, :group
I know how to avoid SQL injection attacks when you use :conditions User.find :first, :conditions => ["login=?", params[:username]] but how about with :order, :limit or :group? # uh-oh...spaghetti-oh User.find :first, :order => "login; delete from users; select * from users" Pat --~--~---------~--~----~------------~-------~--~----~ You received this message because you
2007 Dec 21
4
StoryRunner docs/guidance
Hi all, Are there any plans for better documentation for the new StoryRunner feature? I tried to use it today (with Rails), and had a hard time getting my head around whether I was doing it "right" and exactly what things are appropriate to test at that level (this might be exacerbated by the fact that I''ve never really used integration testing that much). A full example of
2012 Mar 16
3
Simple hiera-puppet usage
Hi all, I am trying to understand how does hiera puppet backend work, so I created the following example: hiera.yaml has only: --- :backends: - puppet --- And the node: node ''testnode'' { $variable = ''kk'' $thing = hiera ("variable") notify { "note: $thing": } } I don''t want to use the yaml backend for now, just want to
2008 Jun 20
15
before_save model callback rspec testing
hi all, i''m learning rspec and i can''t figure out how to test if a callback is executed in a model. my model code is: class User < ActiveRecord::Base before_save :encrypt_password ... def encrypt(password) self.class.encrypt(password, salt) end thanks a lot, cs. -- Posted via http://www.ruby-forum.com/.