tristanm / jstree-rails

A gem to automate using jsTree with Rails 3
Other
26 stars 36 forks source link

readme #2

Closed Marmolin closed 12 years ago

Marmolin commented 12 years ago

I would like to use your gem, but I am missing information in the readme part.

  1. Could it be used for rails 3.1
  2. As I understand it, the gem simplify the usage of jstree as one do not have to download the jstree js file and css file, but does the gem support ypu in any other way
  3. How to use the gem or jstree. could you f´give some example of controller code, view, code , datatructure in the js-file, customisation of the js tree etc. or could you refere to any guide that describes how to use jstree, especially how jastree is loaded with data from the js-file. I have googled for that but cannot find it described anywhere
tristanm commented 12 years ago

Hi Marmolin

  1. The gemspec was changed recently to Rails 3.2 but I have changed this again so that the gem is still compatible with Rails 3.1. However, I recommend using Rails 3.2 if you're able to upgrade.
  2. This gem is just a way to get JSTree assets onto the asset pipeline quickly and easy across multiple projects. Tree implementations are hugely variant. Think of this as the jquery-rails project which just puts jQuery on the asset pipeline for you.
  3. I lost my crystal ball over the weekend so I can't help you with your specific implementation but JSTree's website has great documentation and I recommend https://github.com/collectiveidea/awesome_nested_set for the model side.

If you're just starting out with JSTree I suggest that you install it manually so you get a better idea of how it all fits together. This gem is all about getting JSTree installed quickly and for deploying updates across multiple apps easily.

All the best!

Marmolin commented 12 years ago

Thanks for your advices

If I upgrade to rails 3.2, wlll that not have affect my other gems compatible with 3.1?

I have looked at the JSTree website and the documentation is great. I will use nested_set and I will also follow your recommendations about manually install JStree

However, I still has a a hard time to understand how JStree is loading the data form the rendered json file ! How do you du feed Json tree with the information about that file ? Or is it based on some convention? How do the url option in JStree get the data from the action defined in the url?


Hans Marmolin St: Larsgatan 50, 58224 Linkping, Sweden Phone: +46708371202

12 feb 2012 kl. 20.31 skrev Tristan McHardie:

Hi Marmolin

  1. The gemspec was changed recently to Rails 3.2 but I have changed this again so that the gem is still compatible with Rails 3.1. However, I recommend using Rails 3.2 if you're able to upgrade.
  2. This gem is just a way to get JSTree assets onto the asset pipeline quickly and easy across multiple projects. Tree implementations are hugely variant. Think of this as the jquery-rails project which just puts jQuery on the asset pipeline for you.
  3. I lost my crystal ball over the weekend so I can't help you with your specific implementation but JSTree's website has great documentation and I recommend https://github.com/collectiveidea/awesome_nested_set for the model side.

If you're just starting out with JSTree I suggest that you install it manually so you get a better idea of how it all fits together. This gem is all about getting JSTree installed quickly and for deploying updates across multiple apps easily.

All the best!


Reply to this email directly or view it on GitHub: https://github.com/tristanm/jstree-rails/issues/2#issuecomment-3930258