I need to use Acts As Tree in my Rails3 project (ruby 1.9.2). But, there are lot of forks on github, so I don't know which should I choose, and which is used by other developers?
On Railsplugins.org there are http://www.railsplugins.org/plugins/376-acts-as-tree, but last commit was from March...
I'm using http://rubygems.org/gems/acts_as_tree_rails3. Works great.
I've gone with https://github.com/skyeagle/nested_set on my Rails3 projects. It's hard to say at this point where adoption will take things.
I'd suggest using https://github.com/mceachen/closure_tree if you can add a new table to store the hierarchies and want efficient select and mutate performance.
Related
apollo-link-state and vuex,which one should I use for state management when I use vue-apollo?
https://github.com/Akryum/vue-apollo
Hey i just came across this issue with a project i was working on.
I don't think it really matters what one you use they both do the same thing in a different way. You might want to compare file sizes though as i did not.
Vuex is pretty straight forward compared to apollo-link-state IMO. I didn't want to figure out how to write resolvers in the FE code.
In the end I ended up going with Vuex just because i was familiar with it.
I want to make a vertical line going through the middle of the site and then have content on either side. How can I use CSS or ruby? to do this? I am not sure which one I would need and where I would put it. Also, what is the best resource for learning the syntax of the ruby on rails views/CSS stuff. It seems that rubyonrails.org doesn't have much documentation on that (they mostly explain the models and controllers)
I would suggest you start with something like: https://github.com/softmachine/rails-bootstrap
They provide a link to http://twitter.github.com/bootstrap/ which has plenty of documentation.
The next step, would be to ask a more specific question related to the exact problem you're having.
From your description it sounds like you need css, and depending on the nature of of the information you want to display, you might need to use ruby/rails to make it happen. Most likely, you could just use css.
see: http://jsfiddle.net/aTUq8/
With beta4 and latest beta5 the DB-Feature-Implementation appears to have pretty much finished. There's a couple of tutorials out there how to handle a single Database using the TableGateway Pattern, but it appears there is none for handling M-N-Relationships.
In ZF1 we had findDependantRowset() on the TableGateway which was kind of dirty, as this simply was a second Query to the databse which pretty much isn't always neccessary.
In ZF2 i expected there to be a way to have good Joins mapping to specified models, but i can't find anything within the code. Maybe i'm blind, maybe there really isn't anything like this.
Has anyone of you managed to handle joins and models all together in ZF2? If so, please be so kind to instruct me how to do it, hint me to specific points of the documentation or link me some blogpost to one who has done it.
Thanks in advance guys!
The obvious solution if you need a generic solution is to use Doctrine ORM or Propel.
If you want to use Zend\Db, then within your concrete table gateway classes, you should write a specific method that retrieves the correct rows from the linked table. This way you can ensure that the SQL is optimised for the query that you need.
Just an open ended question - I'm using rails 3.0.9. I want to experiment with sorting systems. I'll want to start with a simple upvote/downvote system, and then try out more complex iterations.
However, I would want not to sort simply on upvotes/downvotes but provide a controllable skew for time (so that really interesting posts eventually give way to new ones).
Anyone have any suggestions on where to read about these sorting algorithms either generally or in rails(3)-specific sources?
Thanks everyone!
try meta-where meta-search in this project sorting was talked about using meta-search gem. i hope this helps
Has anyone used the EmpireDB from Apache? I am planning to use it and would like to know if there are any known issues with this new concept?
I have used ORM like Hibernate and JPA. But EmpireDB sounds like it easy.
Anyone knows its limitations then please let me know.
Thanks.
EmpireDB places impositions on your model classes; you can't just persist your designed model. You add a dependence to their codebase (which could change later). You have to write a lot more code to use it (using its Tutorial) than you would using JDO or JPA. How that is somehow "easy" i can't think.
If you need full control over the sql, you don't want to use entities for everything and hate sql/jpql strings it is the perfect tool.
It depends largely on what you plan to do with it.