search for: acts_a

Displaying 20 results from an estimated 34 matches for "acts_a".

Did you mean: acts_as
2006 Apr 11
1
acts_as ... hourly_list?
Hi, My question is a bit of wonder and a bit of enlightment. I have two models, Channel and ChannelItem, the second is a list of Events, ordered by position (because I''m using acts_as_list). Later I use a method in Channel to recalculate the hour when that show come online, based on the duration of it and doing math based on the previous one duration and start time, starting from 0:00. So, with this info (channel_items): id | channel_id | event_id | position | starttime 1...
2006 Jul 06
3
How To write an acts_as* plugin
Hi, I need to understand how to write an acts_as_XXX (similar to acts_as_tree) plugin Any good resource to get me started? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060706/a974ff06/attachment.html
2005 Nov 04
0
after_find callback in an acts_as plugin
Hi, I am thinking about writing an acts_as_fox plugin that defines an after_find callback method. If I do this what will happen if a user creates a model that acts_as_fox but this model has it''s own after_find callback method? I imagine that the model''s after_find method shadows the plugin''s after_find. Presumabl...
2012 Oct 04
0
acts_as tree, nested_set, something custom? Which would be best for my situation?
...children could then have children. Pretty standard so far. Often a child tag will be under more than one parent (i.e. a child might belong toone or more parents) and it wouldn''t necessarily have the same children under one parent as it would in another. Do and of the current extensions (acts_as_tree, acts_as_nested_set, awesome_nested_set, etc) let a child have more than one parent? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrai...
2006 Jul 04
4
Question about Salted Hash Login Generator
Hi, I am using salted hash login generator to create my login page. In the user_environment.rb file, I saw that there is a comment saying should NOT include the email field in the changeable user fields array. Does anyone know why? > # Add all changeable user fields to this array. > # They will then be able to be edited from the edit action. You > # should NOT include the
2009 Feb 26
2
detecting acts_as_x?
I''m writing an acts_as_x type plugin/gem and I need to know how to detect which other acts_as plugins are installed so I can avoid name conflicts. What''s a simple way to do this? Thanks John Small -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received th...
2006 Apr 30
4
acts_as_ordered_tree
I need an ordered (sortable tree) and I just was thinking if somehting like this is possible: class Item< ActiveRecord::Base acts_as_tree :order => "position" acts_as_list :scope => ''parent_id = #{self.id}'' end For my understanding mixing of two acts_as should be p?ssible, at least in this case, right? Unfortunatly the :scope is not working, I am not sure how to write the scope so that onl...
2006 Dec 31
1
How do you use acts_as_ferret without rails?
I am currently using activerecord without rails and I''d like to use the acts_as_ferret plugin as it works well with activerecord. How do I take advantage of the acts_as_ferret without rails installed? Is this possible? If someone could provide me with direction on how this would be done, that would be greatly appreciated. I assume that since active record works without ra...
2006 Nov 27
2
find_conditions in acts_as_ferret find_by_contents
...9;, {}, {:conditions => ''category_id IS NOT NULL''}) >> NoMethodError: You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured while evaluating nil.sort! from ./script/../config/../config/../vendor/plugins/acts_as_ferret/lib/class_methods.rb:288:in `find_by_contents'' from (irb):1 I''m using rev 112 of acts_as ferret and the latest version of ferret. Has anyone else had this problem? Thanks! Daniel -- Posted via http://www.ruby-forum.com/.
2007 Nov 27
1
Plugin - How to access object from instance method
Quick question: Given a basic plugin... how can I access an object that I instantiated in the acts_as method from an instance method? Probably some sort of accessor... but where? def self.included(base) base.extend ClassMethods end module ClassMethods def acts_as_test object = Object.new ## This object needs to be accessible from the Instance Methods end include Acts::As::Test::Instan...
2008 Oct 28
7
aasm callback order?
Hello! Sometime ago I ran across a webpage where someone had identified the full callback sequence for an object lifecycle including AASM with it''s :enter and :exit and whatnot callbacks. Unfortunately, I can''t find it and searches don''t seem to help. Does anyone have a reference to a page that shows the callback sequence with Acts As State Machine (the gem)? I think
2008 Jan 22
11
Unable to load Models which reference plugins?
I''m using a plugin which adds a method to ActiveRecord::Base http://similetimelinerailshelper.googlecode.com/svn/trunk/simile_timeline/ This adds an "acts_as" type declaration to the Models, via the file in vendor/plugins/simile_timeline/lib/simile_timeline.rb Rails is working with these declarations, and they are being used successfully in ''regular Rails''. When I run script/backgroundrb start, I get an error saying that...
2006 Dec 11
1
Using Rails Plugins with Camping
...y liked the simplicity of RubyOnRails, but sometimes you want something fast and everything is relative. After looking at Camping, RubyOnRails seems like a lot of work if you just want to test out a prototype of a small web app. One thing I do miss are all the pre-built plugins for Rails (such as acts_as_taggable). How easy is it to convert Rails plugins to work with Camping? I''ve done my first pass at searching for anything related to adapting Rails plugins for Camping but I only came up with some hackery around Dr. Nic''s Magic Models. Any finger pointing in the right directi...
2005 Oct 31
0
introducing acts_as_shellable gem
Hi all, I''m happy to announce a new acts_as gem, acts_as_shellable. If you find yourself constantly using script/console or another shell interface to rails, then this gem''s for you. This gem''s homepage is at http://www.chwhat.com/projects/shellable The docs are at http://chwhat.com/projects/shellable/doc/index.html You c...
2008 Oct 18
0
Passenger won't allow ActiveRecord to be extended ?
...n that does not modify AR. Passenger 2.0.3 OS X 10.5.4 Built-in Apache 2.2 ruby 1.8.6(114) Rails 1.2.6 In one case, I''m doing this: module ActiveRecord module Validations module ClassMethods # adding my custom methods here end end end And in another, I have created an acts_as plugin which is loaded by conventional means of: ActiveRecord::Base.send(:include, GW::ActsAsPessimistic) This seems to be prettty sttandard stuff, and it works just fine on several dev boxes using mongrel, so I don''t see how I''m supposed to do anything different in my source c...
2012 Apr 05
0
Polymorphism, acts_as_relation gem and nested attributes
I have the following polymorphic association set up with acts_as_relation (https://github.com/hzamani/acts_as_relation) Model code: class Email < ActiveRecord::Base belongs_to :detail validates_presence_of :address end class Detail < ActiveRecord::Base acts_as_superclass has_many :emails accepts_nested_attrib...
2006 Jul 26
13
tweaking minimum word length?
Hi, Can Ferret be configured to change the minimum word length of what it indexes? Right now it seems to drop words 3 characters or less, but I''d like to include words going down to 2 characters. How would I do that? Francis
2006 May 04
2
Enterprise Database Tier (XA transactions, COBRA and MIDAS)
I am developing a large scale financial application which is going to be very intensive write-wise, and use a lot of transactions. I can see how the the web and application servers can be scaled and load balanced quite easily, but not the database tier. The setups I have looked at so far seem to deal with coping with a lot of reads, and minimal writes - this maybe because they are largely
2011 May 01
2
More detailed Test::Unit error report
Hi, I''m starting to use Test::Unit to create unit tests for my Rails Applications/Plugins. I don''t have much experience in Ruby Unit Testing. The problem is that the output report is very simple and it is very difficult to discover where is the error. Test::Unit does not show the line number of the error and the Stack Trace printed using the --trace option does not help either.
2006 Jun 30
0
Three ActiveRecord features we want at work - any comments/suggestions?
...l be constrained NOT NULL. - Easily store temporal (historical) data, and not rely on ad-hoc schemes for recording previous information - Use class-table inheritance What I''m interested in is how feasible the possible solutions to these sound, and whether they could be implemented as acts_as plugins or would have to patch ActiveRecord directly. I''ve found that developers coming from C# or Java to Ruby and Rails get Rails-spoilt, in that Rails does so much for them they expect it to do EVERYTHING. So I want my solutions to be as straightforward and self-explanatory...