similar to: here to put custom code in the files system

Displaying 20 results from an estimated 300000 matches similar to: "here to put custom code in the files system"

2006 Apr 17
0
Where is the correct place to put custom exception classes?
I would like to create a custom exception class for my app. Where is the best place for it and is there any facility in Rails to make it easy for me to have access to my exceptions? Thanks, Wes -- Posted via http://www.ruby-forum.com/.
2007 Sep 07
5
Custom Analyser .. where to put it ??
Hi, I m trying to use a custom analyser to add my french stop words... i m reading the tutorial at : http://projects.jkraemer.net/acts_as_ferret/wiki/AdvancedUsage My problem is that i ve no idea where to put my custom Analyser class like : class GermanStemmingAnalyzer < Ferret::Analysis::Analyzer include Ferret::Analysis def initialize(stop_words = FULL_GERMAN_STOP_WORDS)
2006 Apr 20
8
2 layouts per .rb page
Hi, Is this possible ive got layout "loggedout_layout", :only => [:login, :logout] but I also want to do somthing like layout "loggedin_layout", :except => [:login, :logout] When the second one is introduced it seems to cancel out the first request, any suggestions how to get around this? Scott -- Posted via http://www.ruby-forum.com/.
2006 Apr 20
4
css
Hi im using this code below layout "loggedout_layout", :only => :login, :logout this part limits it to logout only, how can I get it to limit it to logout and login? Thanks Scott -- Posted via http://www.ruby-forum.com/.
2007 Oct 11
0
Custom rescue_action_* methods not being called?
All, Rails 1.1.6 Ruby 1.8.6 Win XP It appears that none of my rescue_action_* methods, if defined in my application.rb file, are being called. I''ve placed debug statements inside of the ActionController Rescue module to verify that rescue_action is being called. Here are my overrides in application.rb, none of which are being called - they are all protected visibility (these are just
2006 Jun 20
2
website hosting
Hi, im looking for a shared web host account that will support rails (php 5 would also be a bonus) Has any one got any recommendations? thanks scott -- Posted via http://www.ruby-forum.com/.
2010 Nov 06
2
Custom File List for Rails 3 Spec Task
I have some javascript specs (using the jspec javascript framework) in my rails 3 project, living in the spec/javascript directory. How can I exclude the ruby files in the jspec project from being run when I run "rake spec"? RSpec::Core::RakeTask used to take a file list (which was usually generated with a glob pattern and an explicit call to Dir.glob). Now it only takes a glob
2006 Apr 13
4
Apache/fastcgi setup can''t find custom config/*.yml file!
All, Apache 2/FastCGI on Linux My fastcgi config. file is set up to run the "test" RAILS_ENV. When I go to access a view associated with a particular controller, I keep getting a ENOENT (file not found) error on a custom config. file that I am attempting to load. What I can''t figure out is why it can''t find the file. Here''s the code that loads it in my
2007 Oct 20
1
Rake task and custom code.
Hi I have some classes I''ve created to perform some work on my site. I''d like them to be usable in my Controllers, and MORE specifically in my Rake Tasks. Where should they be used so when I require / load them they are found? Thanks. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2006 Jun 14
1
page caching with custom routes
hi , I''m having problems with expire_page with custom routes i''ll show some code blog_controller --------------- def clear_cache_rss_artikels expire_page url_for(:controller => "xml",:action => "rss_artikels") end this is called when a new article is posted or edited or destroyed xml_controller --------------- class XmlController <
2008 Apr 22
2
Custom Mysql queries slower than ActiveRecord in production
I have been working on optimizing the performance of a Rails app by rewriting the AR record methods into custom sql queries. What I did is that the result from the query is not instantiated as an object, which is supposed to be too time consuming. Here are the performance difference between using default AR methods and its custom equivalent. The number of requests per second was read from the log
2006 Dec 11
2
Custom Validator
I want to add a custom validator in one of Model. For example Rails has inbuilt validation methods like validates_uniqueness_of, validates_presence_of . What I need is a similar kind of method (example: validates_line_items), that can run my custom code while saving, updating the record and can add custom error messages to the record. Please help me by suggesting how i can do this. -- Posted via
2006 Mar 02
2
custom sql queries beyond CRUD
Hi, I am just starting of in rails. I am trying to understand the features of rails and I have this burning question. (and search is not available now): Apart from relying on the automatic CRUD sql script produced, is there a way I can create my own sql script ex: with many joins between exixting tables (for reporting ). All I need is to declare the custom query and place the result in a
2007 Sep 01
0
Problem with custom Mime::Type.register.
Hello all, I''m running into a slight problem with Rails and the respond_to function in controllers. I''ve registered a custom Mime::Type of application/x-amf :amf (Mime::Type.register "application/x-amf", :amf). The problem I''m having is that the respond_to function never responds to the application/x-amf content-type. I think I''ve narrowed it down to
2010 Apr 14
1
Rails does not display form error message on a custom method
Hi all, I''ve created a custom method called checkout in my app. I create an order (which is done my adding products to my "cart"), assign it to my client, and then I head to my checkout screen where I confirm the items and enter their customer order number and complete the order (submit). Everything works great except that it doesn''t display error messages.
2011 Feb 04
0
How to access custom field of standard/custom object of salesforce
Hi, I am communicating with salesforce from my ROR app and it works fine with standard fields. But while accessing any custom field of standard/custom object of salesforce, I am getting below error: undefined method `VisitDate'' for #<Salesforce::VisitorReport:0x28d41e0> Here VisitDate is custom field and VisitorReport is custom object of Salesforce org. Please help me to solve
2007 Jan 06
1
[LLVMdev] Custom load/store code: determining offset or alignment
Firstoff, let me say what a mind fsck the Cell SPU can be. It's really not that hard an architecture to get one's mind around, but I can see how it becomes a compiler writer's nightmare. And I'm attempting to write a SPU backend. And it's going slowly. Here's my problem: The SPU's registers are all 128-bit vector registers. That's their native mode. They can be
2006 Jun 21
0
Including custom files
I understand RoR better and better.:-) Particularly since I read "Mr. Neighborly''s Ruby and Rails" (which I can recommend to newbies like me). But a few questions: I want to have a dynamic menu, displayed depending on group belonging, included in my layout. I guess I can make a separate file and use file.read to include it. Where do I keep that file in the system, does it
2008 Sep 09
2
form_for submit to a custom action
hi forum, I am new to rails, and i am just getting my hang of things. Problem, how do you pass content captured in a form to a custom method? I have the following form: <% form_for :message, @message, :url => { :action => ''reply''} do |f| %> <table cellpadding="4" cellspacing="5"> <tr> <td>Content:<%=
2006 Jul 06
2
Custom init. of ActiveRecord objects - best practices
All, I''m wanting to initialize an ActiveRecord object. I understand that there is a method called after_initialize that appears to get called right after the ActiveRecord object is instantiated. Is after_initialize a Ruby thing or a Rails thing? Where is after_initialize documented? Can I pass parameters to it? If so, how? I want to initialize the "belongs_to" attribute of