similar to: scoped_access plugin and 2.0

Displaying 20 results from an estimated 200 matches similar to: "scoped_access plugin and 2.0"

2006 Jun 28
2
[PATCH] Bug fixes and additions to scoped_access
I found that scoped_access does not re-evaluate the filters on every run. If you are filtering access based on parameters, this can be bad. The scope is set on the first request and then further requests use the last generated scoping. The initial part of ScopedAccess::Filter#before looks like this: @scoping = controller.instance_eval(@scoping.to_s) if @scoping.is_a?(Symbol) This makes
2006 Mar 30
4
with_scope and filters for Rails 1.1 (scoped_access plugin)
Has anyone successfully gotten the scoped_access[1] plugin to work in Rails 1.1? Some of the methods it was relying on are now no longer accessible. It seems the only way to add scope is to use the ''with_scope'' method that takes a block, but since Rails doesn''t have real around filters[2] I cannot see a way of adding a scope using a filter. Anyone using with_scope
2007 Aug 21
2
using restful_authentication current_user inside controller specs
I''m using restful_authentication in my app and I have the before filters in my application rhtml: before_filter :login_required around_filter :set_timezone around_filter :catch_errors Currently I have them commented out while rspec''in but I''ll need to add them in my specs. def create @ticket = Ticket.new(params[:ticket]) @ticket.user = current_user if
2011 Mar 08
0
keep getting an error, "rescue in load_missing_constant': uninitialized constant Paperclip::Glue (NameError)"
hi, there rails: 2.3.8 machine os: Ubuntu 10.04 Lucid I''m having some problems with my rails installation in one of my new development machines. I have installed all the gems in my config/environment.rb file. When I now run either script/console or script/server, I have the error of " `rescue in load_missing_constant'': uninitialized constant Paperclip::Glue
2006 Mar 21
0
cache and exception safe around_filter (after_filter)
Hi, I was wondering if there is a feature or construct in rails that is guaranteed to run after an action like an around_filter (or after_filter) but will still run regardless of a broken filter chain or thrown exception? Currently I have an around filter setup, and I really require the after part of the filter to run, although if the filter chain is broken via cacheing or an exception is
2010 Jan 27
1
around_filter and with_scope
i got two controller (with restful actions) where my code is quite ugly and not very dry. every action looks quite like this: if @logged_user.has_role?("admin") User.find(params[:id) else @logged_user.group.user.find(params[:id]) this is a security check that enforce a simple spec: normal user should read/write information only about their group''s users, but
2006 Jun 15
1
Unicode hacks - problem
I have updated to latest Unicode hacks plugin and now it fails when rails are started .... C:\ruby_projects\radrails\workspace\auth_template>mongrel_rails start ** Starting Mongrel in development mode at 0.0.0.0:3000 ** Starting Rails in environment development ... C:/ruby_projects/radrails/workspace/auth_template/config/../vendor/plugins/scoped_access/init.rb:17:in
2007 Nov 08
0
error on migration
Hi all, I''m just getting started with rspec. I''m using trunk rspec with edge rails. I get an error on migration though, here it is: rake db:migrate RAILS_ENV="test" --trace (in /home/pat/railsapp) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! undefined method `failure_message'' for class
2006 Apr 03
4
Clearing out filters in ActionController
I want to run a single filter in my application.rb file, and then if a certain condition is true, end the action''s processing immediately. Right now I''m using prepend_before_filter to ensure that it gets run first, but some of my around_filters are still being processed. Is there a way that I can clear out all the filters that should be run? Basically it''ll look
2009 Mar 14
5
The 2.3 branch and Rails Edge failing
I found Brandon''s 2.3 branch for Facebooker and thought I''d give that a try to get around the problems I ran into starting script/server with Rails Edge. Unfortunately, no go. The error I get on start up is: > /Users/user/Sites/iwr2/vendor/rails/activesupport/lib/active_support/ > dependencies.rb:440:in `load_missing_constant'': uninitialized > constant
2010 Feb 27
1
Cannot migrate DB due to "getaddrinfo: Name or service not known"
I am using Rails 2.2.2 and try to do a DB migration, but got the following error. I am using Centos 5.4. Can someone give me a clue? >> rake db:migrate RAILS_ENV="production" rake aborted! getaddrinfo: Name or service not known (See full trace by running task with --trace) [current]$ rake db:migrate RAILS_ENV="production" --trace ** Invoke db:migrate (first_time) **
2010 Nov 29
0
rake aborted! getaddrinfo: Name or service not known
I''m deploying new rails applications. Everything works well except when it comes to the db migration: * executing "cd /var/rails/benefits_test/releases/20101129190121 && /opt/ruby-enterprise-1.8.7-2010.02/bin/rake RAILS_ENV=production db:util:migrate" servers: ["ps-test-app1"] [ps-test-app1] executing command ** [out :: ps-test-app1] (in
2008 Jan 30
3
Not all mongrel starting (Errno:EEXIST)
I''m playing with the mongrel clustering, and am having a problem getting 2 mongrels to start up reliably. This should be a pretty simple cluster, with just 2 instances running. My mongrel config (mongrel_cluster.yml) looks like: cwd: /deployment/installed/myapp/current log_file: log/mongrel.log port: "8000" environment: production address: 127.0.0.1 pid_file:
2008 Sep 13
2
<meta http-equiv="refresh" content="5"/>
Do you know of any way for me to stick a meta tag in using a before_filter or after_filter or around_filter? <meta http-equiv="refresh" content="5"/> I have been trying to figure out out and just cannot make sense of it. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2007 Apr 23
0
request logging: around_filters can't see error responses!
Hello, I want to emit a structured log entry (in YAML) for every request that hits my Rails app. For example, an entry in this log would look something like: --- SYSTEM_TIME: 0.0166666666666667 USER_TIME: 0.0999999999999996 DB_TIME: 0.00247621536254883 REAL_TIME: 0.091976 STATUS_CODE: 500 SESSION_ID: 64ad46a8841c66bbf64e93335cedc50d REQUEST_ID: 32d6a42f-da58-43e2-ab27-09d3e2a775cb
2006 Jul 17
1
:create paramaters don''t get through (scoped_acces plugin)
Hi all, I''m wrestling with the scoped acces plugin to generate object access controll, but the :create params don''t seem to get through. :find works great. This is the code around_filter ScopedAccess::Filter.new(Service, :service_filter) layout "settings" protected def service_filter { :find => {:conditions => ["business_id =
2010 Nov 30
2
db migration fails
I''m deploying new rails applications. Everything works well except when it comes to the db migration: * executing "cd /var/rails/benefits_test/releases/20101129190121 && /opt/ruby-enterprise-1.8.7-2010.02/bin/rake RAILS_ENV=production db:util:migrate" servers: ["ps-test-app1"] [ps-test-app1] executing command ** [out :: ps-test-app1] (in
2012 Oct 16
5
`method_missing_without_paginate': undefined method `class_attribute' for ActiveRecord::Base:Class
hi i am using radiant 0.8.2 , rails 2.3.4, ruby 1.8.7 and rubygems 1.4.2. and i can''t able to run my existing application. error occurred : run command for server "script/server -e production -p 3001" error: => Booting WEBrick => Rails 2.3.4 application starting on http://0.0.0.0:3001 config.gem: Unpacked gem rack-rewrite-1.2.1 in vendor/gems has no specification
2009 Apr 30
1
Plese have a look on this error and tell me y it comes
Drive\Ruby Projects\ramf>ruby script/generate model category by/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:440:in `load_missing_constant initialized constant RAMF::OperationProcessorsManager (NameError) from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:80:in `const_mis from E:/D Drive/Ruby
2008 Jun 09
2
cruisecontrol integration
Hi everyone. Backgroundrb is doing some really sweet stuff for my project. Thanks! I am trying to integrate backgroundrb with cruisecontrol.rb. I started off by creating a simple Rakefile::::: desc ''task for starting up backgroundrb'' task :cruise do template = <<-EOF :backgroundrb: :ip: 0.0.0.0 :port: 11006 :development: :backgroundrb: :log: foreground