similar to: STI or MTI design ?

Displaying 20 results from an estimated 5000 matches similar to: "STI or MTI design ?"

2010 May 12
3
Best Gem For Threaded Comment Storage?
Dear List, Given that I am developing a rails 2.3.5 site, When it comes to storing threaded comments in a blog or forum, Then which plugin/gem should be considered "State of the Art"? I''m starting with these URLs: http://github.com/rails/acts_as_tree http://github.com/rails/acts_as_nested_set http://github.com/collectiveidea/awesome_nested_set
2011 Mar 08
2
Rails - Acts as Nested - Impossible move, target node cannot be inside moved tree.
Hello, I''m using the Awesome Nested Set plugin: https://github.com/collectiveidea/awesome_nested_set And in my model I do the following: acts_as_nested_set after_save :ensure_max_nestedset_level private def ensure_max_nestedset_level if self.level > 2 self.move_to_child_of(parent.parent) end end I do this to keep the levels from getting
2009 Jun 21
1
cannot do mass_assignment when inherited class ?
I got the following error when trying to create the elibrary instance (rdb:21) @elibrary = Elibrary.new(params[:elibrary]) RuntimeError Exception: Declare either attr_protected or attr_accessible for Elibrary, but not both. params : "elibrary"=>{"title"=>"bingo three", "short_description"=>"something new",
2012 Oct 04
0
acts_as tree, nested_set, something custom? Which would be best for my situation?
I''m creating a hierarchical tag structure for my portfolio. I have a few top level tags. those could then have children, those 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.
2010 Aug 12
4
[Rails 3] How to test routes urls in console
I tried require ''url_writer'' but this is not the trick what should be required/included to test the routes urls ? thanks erwin -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this
2009 Aug 19
10
acts_as_list / acts_as_tree / acts_as_nested_set - which one
I am creating forum application which needs usage of acts_as_list or acts_as_tree or acts_as_nested_set. I am unable to decide among these. please could some one recommend from their experience? -- Posted via http://www.ruby-forum.com/.
2008 Dec 13
2
how to import a dump .sql file in a rake task
I have a dump of some tables to be filled when the app is setup ''.../db/dataset/regions_dpt_cities_codes.sql'' I would like to execute a task similar to the >mysql source <dump_file> like : ActiveRecord::Base.connection.execute("source #{path};") (which doesn''t run fine, of course.... is it possible in a rake task ? if yes, any suggestion ?
2009 Feb 09
2
dynamic constant assignment
I have a constant set up like that : ALL_LOCALES => {"it"=>"Italian", "fr"=>"Français", "de"=>"Deutsch", "en- GB"=>"English (UK)", "es"=>"Español (España)", "pt-PT"=>"Português", "pl"=>"Polski", "en-US"=>"English
2006 Nov 16
1
Strange indexing issues with CachedModel, STI, and AAF
I started using robotcoop''s CachedModel class in my project but have encountered problems when using it with the acts_as_ferret plugin. It seems it doesn''t index everything in my STI model, also if I do a search from my base STI class I get a result count but no results. If I run the same search from one of the children STI models I get the appropriate results (if the information
2011 May 17
2
Can't dump File ... when uploading files
I am getting this error on the redirect_to command ... I am using Rails 3 w Paperclip to upload files ( but I tried also CarrierWave .. same error) I tried to change the session store from cookie-based to database .. same error I tried to delete the params content ... I don''t know what to try next .. any clue ? thanks erwin -- You received this message because you are subscribed to
2012 Jan 15
2
ruby-debug19 error undefined symbol: ruby_current_thread
I am trying to deploy a Rails app ( Rails 3.0.9 / Ruby 1.9.2 ) in production (Debian 6) it''s running fine in development mode on localhost ( OSX) I am getting this error from Passenger : undefined symbol: ruby_current_thread /var/www/vhosts/mydomain.com/rails/testsbga/shared/bundle/ruby/ 1.9.1/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.so: undefined symbol: ruby_current_thread -
2012 Oct 16
8
<form> tag is self-closing before input fields .. (HAML generator used)
The form is inside a table, enclosing a <tr> = form_tag admins_backoffice_dashboards_path, :remote =>"true" do %tr.search %th= link_to t(:clear), "#", :id => :clearFilter %th= select_tag :role, options_from_collection_for_select(Role.global, :id, :name, :selected => @role_id ) %th= text_field_tag :email, nil, :value
2011 Nov 24
0
legacy MTI schema
Hi all, In a legacy ''immutable'' schema I have MTI inheritance setting: <<TABLE systems>> id<<PK>> ( NOT database generated) installation_date manufacturer serial_number <<TABLE lifters>> id<<PK>><<FK>> ( NOT database generated ) max_weight drive In my model I have implemented the semantic of inheritance between
2010 Mar 23
7
redirection in format.json ...
I have presently a render :json which modify the current page if @request.save format.html { redirect_to(@request) } format.json { render :json => { :result => ''success'', :request => request_path(@request) } } .... but I would like rather to redirect to an index page I wrote this but it doesn''t redirect ... format.json {
2012 Nov 09
8
method conditional option pattern
When I have this pattern sign_me(@user, :event => :authentication, :subdomain => subdomain) how can I write it to avoid sending the :subdomain option if subdomain.nil? ( if possible ..) sign_me(@user, :event => :authentication #?, :subdomain => subdomain unless subdomain.nil? ) -- You received this message because you are subscribed to the Google Groups
2012 Mar 26
3
render :json not sending any data back ...
[rails 3.2.2] I perform an ajax call : ... $.ajax url: " /backoffice/expenses/rate" type: "GET" dataType: "json" data: project_id: $(''#project_id'').val() code: $(this).val() success: (result) -> alert result $(''#expense_price'').val(result) in
2009 Feb 17
8
Converting Acts_As_Tree to Acts_As_Nested_Set
Hello, I have a tree structure that needs to be converted into a nested set. A great deal of work has already been done on the tree items, so maintaining the integrity of the id''s is mandatory. However I need the ability to access entire branches of the tree, which is what Nested set does. Does anyone have any suggestions on how to efficiently transfer the tree to the nested set and
2011 Oct 20
2
Rails 3.1.1 why public/system content is not transferred upon deployment
Testing locally I uploaded files into public/system/... folders ( default for Paperclip) Upon deployment ( capistrano) on the remote server, I can see a symlink from public/system to the shared/system/ but the content ( all images ) is not transferred.... I had to do it myself via ftp .. Is it a standard behavior ? or did I miss adding a task in the deployment ? thanks for your feedback --
2013 Jan 02
4
Define 6.1 and 7.1 channel mappings
I apologize for the terribly long message, but here goes. ------------------------------------------------------------------------------------------------- First, regarding existing tools that I now about. libavcodec and users (e.g. HandBrake): - if there are 6 channels or less, the layout is set by the decoder as per the FLAC specification - if there are more than 6 channels, the layout is
2011 Feb 27
10
How to store the same key multi times in a Hash ?
given an Arra tags[] I need to produce a resulting Hash as following .. { "$in" => [tags[0]], "$in" =>[tags[1], ...} in which the key should be always the same and the value being an Array I tried this : myHash = {} tags.each do |tag| h = {"$in" => [tag]} myHash.merge!(h) end but the merge! is only