-
Notifications
You must be signed in to change notification settings - Fork 29
Standard Way of Including Custom Tags in Rails Type Frameworks #22
Comments
I have added this gem to my Gemlock file (either using rubygems and this repo works fine for me). I agree that Rails-specific code indeed should not be put in this repository to keep this repository rails-independent and usable for 'bare' ruby or other frameworks. Application-wideAs you said, yo have new tags application-wide you could modify the I now notice that we might need to add a method to the module (lib/tags/tags.rb), to add tags to I do not know if this is 'complex' enough to add a generator for this. LocalTo add tags for a single controller, it is probably easiest to add the tag in the Rails gemCreating a rail gem is a nice idea. On the other hand, how to decide what additional tags to provide? Just adding lots and lots of them only clutters the application, which is something no-one is waiting for. (Same problem as with this gem) |
"Maybe adding multiple sets, grouped by service/website/something-else, so users are able to pick one (or more) is an idea to solve this 'issue'? (and a full_tags to select all sets)" That's sounds good, I was kind of thinking something like a "complete_tag_list" vs "minimal_tag_list" or something, but now I see how powerful groupings could be. I think discrete wordpress plugins are used to add support for specific bbcode. I don't follow wordpress closely, but we could mirror the groupings in a similar style: Groups: Before we/I look into the rails gem, we'll have to sort out how tags works. Would you like to do the tag groups in this gem? Possibly in the form:
complete.rb could contain some code to look through the entire tags directory, and merge all the tags it can pull out of all the files into one big hash. |
This is kind of a sticky issue too, isn't it? I can't put the issue out of my head, I think maybe deciding on a good usage example is a good step one.
So by calling that add-tag_set method, we could pass in additional tags. That looks pretty clean, right? Then we'd need to decide if /lib/tags/ is the best folder for the ExtendedTagSet module. Theoretically, we could pull the extended tag set out into it's own repo. That would keep the clutter completely out of this repo. We could also set that repo as a dependency of this one, so users would be able to use it without having to add more gems to get access to it. |
Yes, I am warming up for the groups idea as well! :) Adding the groups in this repository might be nice:
Then we indeed need to think about a way of 'registering' tag groups (so users can even provide their own as well!). So something like I think this new feature can become the 'main feature' for the release after the one containing my BBCodeErrorTemplate update! :) |
I've been wondering what the best way is to use custom tags in a rails app. Would you expect the standard way to fork this repo, edit the tags in the fork, and then point bundler at the fork? I feel like that works, but it's a little external, so there's either an easier way to do it, or it might be worth spending a little time on.
I've been thinking of a gem
ruby-bbcode-rails
similar to the rspec-rails gem, which when installed in a rails app will automatically create a rails initializer called config/initializer/ruby-bbcode.rb containing the tags definition.This could lead to something like
rails g ruby-bbcode:full-tags
which would override the default minimal tag set and use a larger tagset located in the ruby-bbcode-rails repository.I don't want to tackle something that big at the moment (I've already spent a little more time today off task than I meant to, lol) and it definitely should be kept out of this repo given that it's framework specific, but what are your thoughts on custom tags?
The text was updated successfully, but these errors were encountered: