similar to: Structure for complicated controller

Displaying 20 results from an estimated 100000 matches similar to: "Structure for complicated controller"

2009 Mar 06
2
Routes.recognize_path on more complicated Routes
For a permissions system i''m writing i''m extending the standard link_to helpers to check if a user has a permission to perform that action before displaying a link to clean-up my code so i don''t have to put if checks all over them. I''m trying to use.. ActionController::Routing::Routes.recognize_path(url, :method => method) to get the action and controller
2008 Nov 25
0
Full text search with complicated conditions
Hi all, I am going to do full text search, but only on records that match quite complicated conditions. I have implemented these as custom named_scopes, with some SQL. Does anyone know if I can use these named scopes in filtering out results returned for example by Sphinx? I have looked at ThinkingSphinx, but it allows you to specify only simple conditions conditions and does know nothing about
2006 Sep 06
5
admin controller problem
I am reading the agile web development with rails book, and starting to create the depot. I am getting the below error after setting up the "ruby script/generate scaffold Product Admin" does anyone know what the problem is? NameError in AdminController#index uninitialized constant Mysql RAILS_ROOT: ./script/../config/../ Application Trace | Framework Trace | Full Trace
2007 Feb 18
1
namespaces in subclasses
I have several modules that I store in rails_root/lib and that are used by my controllers. I''m having a problem accessing AR objects from inside a class that is a subclass. I keep getting a NameError when trying to do something like Foo.find(), where Foo is an AR object. uninitialized constant OpenTransact::Gateway::Request::CreditCardCharge::PaymentAccount (NameError) For some reason
2009 Jan 22
1
Accessing a c-level complicated structure from R
Hello, R-devel seems to be the appropriated list for what I'm to ask: soory if I'm wrong. I am a c newbie but nevertheless I am trying to 'couple' an extern c software with R. The compiled library is actually a stand-alone c program, which uses text file for input and output. It uses *lots* of differents and (to me) rather complicated and nested "struct"s to represent
2007 Mar 29
0
using certificates with ActiveResource
I''m trying to hack ActiveResource to use a self-signed certificate when connecting to my RESTful rails app (seems like a pretty glaring hole that it doesn''t offer this out of the box... though I guess it is alpha software). I started out going through the ActiveResource code looking for somewhere I could set the cert and key. Didn''t find it, so I took the approach
2006 Sep 18
2
Datebocks and EdgeRails
Hello, I am having trouble trying to use the Datebooks Engine with Edge Rails. Has anybody try with it? It seems that the problem has something with loading the layout, and complaints about the number of arguments. I will thank any help or guide. Thank you very much. ========================= I have copied the error I get ArgumentError wrong number of arguments (2 for 1) RAILS_ROOT:
2007 Apr 18
3
nil.symbolize_keys -- error with attachment_fu
I''ve spent at least 2 hours on this one problem. On my local machine in my controller I have this: def new @page_title = "New User" @user = User.new @photo = Photo.new end All is good. Now, on the remote server I get an error when accessing the ''new'' view. If I remove @photo = Photo.new from the controller then the error goes away. This same error
2007 Jun 17
1
actionmailer & picture
Hello I''m using action mailer to create an HMTL outbound email. This email renders a partial. In that partial, a call is made to a public location to get a picture for display in the email. When this email is generate, I get the following error (note: I''m sure it has something to do with not understanding the context of actionmailer and how it functions): NoMethodError in
2007 May 30
2
ActionView::TemplateError
Hi, I have a strange problem that only occurs on the production server. I''ve been banging my head for hours trying to figure it out with no success. Below is a copy of the error from the production log. ActionView::TemplateError (Expected /www/rails_apps/scanlan/current/ public/../config/../app/models/image.rb to define Image) on line #6 of app/views/admin/design/_record.rhtml: 3:
2007 Aug 18
1
problem with file_column url generator
Hi, I have the following in a viewer Here, @lst = Homework.find(:all) is an array of homeworks. I checked this this is correct. Based on the error below, somehow, the url_for_file_colum does not like to act on the model element. I checked the source code to url_for_file_column, and the problem is with instance_variable_get(). I have no idea wat is going on! Any help is appreciated. Gordon.
2001 Jan 04
1
Large complicated VPN setup. (Help with)
Hiya everyone. I am currently evaluating tinc for use by my company's vpn needs and I would like some help/information about configuration of tinc and if it will do what I would like it to do. Hopefully some kind soul will help me with what I am trying to achieve. I am sorry if this is an inappropriate forum for this question but I am looking for people with some ideas on networking generally
2006 Oct 09
1
error running 'ruby script/console' => "uninitialized constant RAILS_ROOT" ??
Hi, Anyone suggest why when I try to run the console via ''ruby script/console'' I get the following "uninitialized constant RAILS_ROOT" ?? Error: ================================ V:\Source\testapp>ruby script\console Loading development environment. ./script/../config/../config/environment.rb:3:NameError: uninitialized constant RAILS_ROOT
2007 May 07
1
attachment_fu seems to be searching the wrong location for my images
I just installed attachment_fu and for some reason, it seems to be looking in the wrong location for my images. I have a Product model that belongs to a photo model. the photo model has the attachment_fu installed and configured like so: class Photo < ActiveRecord::Base has_attachment :content_type => :image, #Allow standard image formats :path_prefix
2007 May 24
0
reverse proxy holding onto port, complicated
I have a rails app that is behind a firewall and I need to be able to ssh into the box, so I do this... - create a reverse tunnel from the rails system to my system using ssh -R - ssh from my system to the rails system thru the reverse tunnel It works great ! But, if/when I restart my mongrel cluster, one of the mongrels always fails with an "port in use" error. I guess
2007 Sep 14
1
script/server with options
I have hacked a script that I found at http://www.koders.com/ruby into a generalized webrick startup script. The script is attached to this post and the help text is reproduced below. "script/server" runs webrick on port 3000 bound to 0.0.0.0. If that is too general then you can pass a specific port using -p= or --port=. "script/server -s" runs webrick in ssl mode and
2007 Mar 12
0
Undefined method: hashed_password ?
I bought the Agile book to learn Rails, and everything was going smooth until Iteration F1: Adding Users. I''ve double checked my code, used the code provided by the book, and still it returns this same error message: **** NoMethodError in LoginController#add_user undefined method `hashed_password='' for #<User:0x473f0d8> RAILS_ROOT: ./script/../config/.. Application
2008 Feb 28
2
random exception driving me crazy: SecurityError (Insecure: can't modify array)
Hi all, I''m running into a very strange but incredibly annoying problem that I just can''t seem to solve. The exception is occurring from a seemingly innocuous line in my code, a simple ''logger.warn("some debug information")''. The backtrace follows: SecurityError (Insecure: can''t modify array)
2006 Aug 26
5
LiteSpeed Web Server 2.2 with Ruby Rails integration....
Fellow Rail users and developers, Right now the easiest way to run Rails is in combination with Mongrel. However, it may not be a good idea to expose Mongrel directly to the outside world in a high-load production environment. In-addition, Mongrel_cluster + proxy + load balancer have to be used even for a single server deployment making the unified setup more complicated than needs be.
2008 Sep 11
4
(unknown)
I do not seem to understad what this error is about. Some body help. wrong number of arguments (1 for 2) RAILS_ROOT: C:/INSTAN~1/rails_apps/project/config/.. Application Trace | Framework Trace | Full Trace #{RAILS_ROOT}/app/controllers/user_controller.rb:10:in `authenticate'' #{RAILS_ROOT}/app/controllers/user_controller.rb:10:in `process_login''