search for: nodoc

Displaying 20 results from an estimated 150 matches for "nodoc".

Did you mean: odoc
2006 Jul 31
2
is it possible to make to_xml use underscore instead of dash?
Hi all, I am getting ActiveRecord to produce XML with render :xml => @user.to_xml However, on the client end it is a bit annoying for me to deal with attributes like first-name. I would much rather have first_name. Is there any way for me to turn off the behavior of converting _ to -? This seems to be done by a call to dasherize inside the to_xml of
2014 May 27
2
[PATCH] ruby: add :nodoc: comment for internal methods
...+ b/generator/ruby.ml @@ -522,6 +522,15 @@ get_all_event_callbacks (guestfs_h *g, size_t *len_rtn) * +guestfs_%s+[http://libguestfs.org/guestfs.3.html#guestfs_%s]). */ " f.name args ret f.shortdesc doc f.name f.name + ) else ( + pr "\ +/* + * call-seq: + * g.%s + * + * :nodoc: + */ +" f.name ); (* Generate the function. Prototype is completely different -- 1.9.3
2009 Apr 10
4
rails2.3/ruby1.9: invalid byte sequence in utf-8 with blank?
hi all, anyone seen this controller argument error: invalid byte sequence in utf-8 ror/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb: 50:in `=~'' ror/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb: 50:in `!~'' ror/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb: 50:in `blank?''
2011 Aug 29
0
Why is #verify_active_connections! :nodoc: ?
Hi, I''ve just got a quick question. How come ActiveRecord::ConnectionAdapters::ConnectionHandler#verify_active_connections! is marked with :nodoc: ? I understand that this is used internally (depending upon an application''s configuration?) on every request (?) to clear out old, stale database connections. All this to prevent the old, classic "MySQL server has gone away..." types of exceptions with applications that som...
2006 Mar 29
2
AR 1.14 oracle_adater.rb does not work
the error is : wrong number of arguments (1 for 0) where : active_record/connection_adapters/oracle_adapter.rb:53:in `attributes_with_quotes_pre_oracle'' this method is new, it was an alias in the previous version : alias :attributes_with_quotes_pre_oci :attributes_with_quotes #:nodoc: I replaced the method by the alias of the previous version, and it is working fine. This is the code (s/oci/oracle/) : alias :attributes_with_quotes_pre_oracle :attributes_with_quotes #:nodoc: -- Posted via http://www.ruby-forum.com/.
2006 Apr 25
2
Bug in Rails 1.1 implementation of before_filters
I just spent a few hours tracking down a bug in Rails 1.1, so I thought I''d post the issue and a workaround just in case anyone else hits it. I designed a security enhancement so that controller methods can be protected by preceding them with a role. The standard Ruby method_added() callback is used to detect when controller methods are added, and then I manipulate the
2006 Apr 27
6
OrderedHash
Looks like I have skipped on this, but still - a couple of questions: 1) Why there suddenly is an OrderedHash in ActiveSupport? (this glaring omission from ruby core is present in many apps already) 2) Why it doesn''t match the semantics of Hash respectively? 3) Why it''s #nodoc ? -- Julian ''Julik'' Tarkhanov please send all personal mail to me at julik.nl
2005 Dec 15
5
Action Mailer - connection refused - connect(2)
hi: I am on Mac OSX 10.4 using locomotive. My ActionMailer configuration is ActionMailer::Base.delivery_method = :smtp # or :sendmail or test ActionMailer::Base.server_settings = { :address => "mail.albertafilmworks.com", :port => 25, :domain => "brucebalmercanada.com" } ActionMailer::Base.perform_deliveries = true
2011 Jun 22
3
Status of Rails.application.routes.recognize_path()
...ing to re-learn or re-discover this method (I hadn''t used it in quite a while) I noticed it isn''t documented ( http://api.rubyonrails.org/). Rails.application.routes returns an instance of the ActionDispatch::Routing::RouteSet class which, looking at the source, has the "#:nodoc:" rdoc tag to prevent it being included in the project documentation. This communicates to me that this isn''t considered part of the public API and is therefor subject to change, be renamed, whatever. So my question is, is this true? Since I''m writing a gem, a rails engin...
2006 Jun 02
5
ActiveRecord: Getting table names
How do i get (discover) all the table names within a database using ROR/ActiveRecord ? I wish to build a webapp that connects to a database on the fly, discovers tables and column names etc and then can show data or build a report based on user selection. The ActiveRecord API doesnt seem to give any method for getting table names. -- Posted via http://www.ruby-forum.com/.
2013 Dec 09
2
[PATCH] rework master-to-worker signaling to use a pipe
...5159..638b846 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -97,6 +97,11 @@ module Unicorn logger.error "#{prefix}: #{message} (#{exc.class})" exc.backtrace.each { |line| logger.error(line) } end + + # remove this when we only support Ruby >= 2.0 + def self.pipe # :nodoc: + Kgio::Pipe.new.each { |io| io.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) } + end # :startdoc: end # :enddoc: diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb index f15c8a7..ae8ad13 100644 --- a/lib/unicorn/http_server.rb +++ b/lib/unicorn/http_server.rb @@ -42,16 +42,8...
2006 Jul 27
9
Introspecting validates_presence_of
Hello people, I''d like to detect whether an attribute of a model has vaildates_presence_of applied to it so I can automatically apply a mandatory (*) to the field...it doesn''t look easy...any ideas? Cheers, -- Dan Webb http://www.danwebb.net
2006 Mar 21
2
How do I get substring of utf-8 string?
I''m trying to get substring from a utf-8 encoded string. (say, first 50 characters of the string) String#[0..49] would give me the first 50 bytes not 50 characters.. I know there is jcode library, but it only let you count number of characters in utf-8 string. unicode gem doesn''t seem to help much. unicode_hacks gem seem to solve the problem, but it also seems to
2006 Sep 04
2
"include" versus "extend" - what's the difference
...INGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. module CollectiveIdea #:nodoc: module Acts #:nodoc: # Specify this act if you want changes to your model to be saved in an # audit table. This assumes there is an audits table ready. # # class User < ActiveRecord::Base # acts_as_audited # end # # See <tt>CollectiveIdea::Acts::Audited::...
2006 Jun 21
1
Plugin Panic! - no accessing a model''s class methods?
...wer in the acts_as_versioned or any other plugin (since none create new instances of their calling model class). full plugin contents follow. *whimper* help? -- Matthew Beale :: 607 227 0871 Resume & Portfolio @ http://madhatted.com # ActsAsCopyable module FakeActiveRecord module Acts #:nodoc: module Copyable #:nodoc: def self.append_features(base) super base.extend(MacroMethods) end # declare the class level helper methods which # will load the relevant instance methods # defined below when invoked module MacroMethods de...
2007 Apr 01
8
No stacktrace on errors (edge rails)
Hi, I must be missing something or have something misconfigured, but I get no stack-trace when there is an error in the code behind a view. If the view doesn''t compile, then I see an error & stacktrace, but all other errors I get a "lost network connection" from the browser, and nothing at all in the server output or development.log. It''s been that way with
2006 Aug 10
5
Major security vulnerability in the latest Rails 1.1.5
...ack/lib/action_controller/routing.rb =================================================================== --- actionpack/lib/action_controller/routing.rb (revision 4745) +++ actionpack/lib/action_controller/routing.rb (working copy) @@ -270,10 +270,11 @@ protected def safe_load_paths #:nodoc: if defined?(RAILS_ROOT) + extended_root = Regexp.escape(File.expand_path(RAILS_ROOT)) $LOAD_PATH.select do |base| base = File.expand_path(base) extended_root = File.expand_path(RAILS_ROOT) - base.match(/\A#{Regexp.escape(ext...
2005 Mar 21
3
how to keep Asterisk up to date on many servers
Hi Everyone. Asterisk is one of those applications that need to be built from cvs on a regular basis to keep up with the changes. I have always used package management tools like apt. How does everyone manage their Asterisk servers? Geoff
2006 Mar 13
1
adding custom cache field
...nsactions_total''. And while declaring the models just add the line, belongs_to_extra :accounts, :total_cache => :amount This code below is tested with edge rail, and will work for polymorphic associations also. Any comments are welcome. module ActiveRecord module Associations # :nodoc: def self.append_features(base) super base.extend(ClassMethods) end module ClassMethods def belongs_to_extra(association_id, options = { }) association_type = association_id.to_s + "_type" if association_id association_primary_key = associat...
2009 Oct 03
2
Looking for a good resource on open-uri and FileUtils
...ta of the file assigned to the given # style, in the format most representative of the current storage. def to_file style = default_style @queued_for_write[style] || (File.new(path(style)) if exists?(style)) end alias_method :to_io, :to_file def flush_writes #:nodoc: @queued_for_write.each do |style, file| FileUtils.mkdir_p(File.dirname(path(style))) result = file.stream_to(path(style)) file.close result.close end @queued_for_write = {} end def flush_deletes #:nodoc: @queued_f...