I'm wondering how to implement highlighting of changes to user edited articles on a wiki style rails project. Since articles may be fairly lengthy I'd ideally like strikethrough and highlighting, similar to github and wikipedia for example. Despite searching around the net I've not really come up with much, apart from instiki which is a complete wiki application.
Thanks in advance for any advice.
To implement in Rails, you should use the a version management gem such as vestal version. Ryan Bates did an excellent screen-cast on the subject. Once you get the versioning of articles, you will want to use the html-diff (or a similar library) to do the html output.
Related
I've searched for railscast 198 updated to rails 3, I can find some snippets here and there but can't find anything for the full source code.. hey it's worth a search; I'm a noob and don't know all the changes that transitioning rails 2 to rails 3 takes.
I run into the problem periodically where I want to use the method in a Railscast episode, but it's for an older version of rails, and run into a few bumps along the way. I've benefited from railscasts more than any information on rails out there, (even stackoverflow is distant 2nd), but this, it seems to me, is the biggest problem with railscasts. Anyone should be able to update the episode source code, it would be great if it would be easy for others to find.
Is there a site or group of people or easy way to find the fork that updates the full episode source code to the current version of rails? +1 if you would use this!
Is this what you are looking for? https://github.com/ryanb/railscasts-episodes
Ryan usually updates his casts(198 was an updated version of 165) so if anyone has it, it's him.
I'm coming from C#, and recently I started to write some Ruby on Rails applications.
My biggest problem with it is the documentation because I find it extremly difficult to use. For example, finding out how to call generator from my controller took me about 2 hours and then 15 minutes after that I found Rails::Generators.invoke method to figure out what arguments should I pass to this function.
Maybe I use the documentation the wrong way; First I take a wild guess and search in the Netbeans code completion, which is rarely helpful, then I search in Google, then go with the API.
Can some experienced Rails programmer give me some advice?
If you're new to rails I recommend you read a book before you dive into the API documentation.
Here are two recommendations:
Agile Web Development With Rails - Great introduction and reference on how to use rails.
Programming Ruby 1.9: The Pragmatic Programmers' Guide - More on Ruby. Great references!
After you've worked your way through those books, you'll have an idea of how Rails is designed and where to look for stuff.
Both books are great reference books. If you want to access the Rails and Ruby API's online, make sure to checkout RailsApi.com
I am describing my own very personal workflow with Ruby/Rails documentation:
You can use ri and rdoc if you are familiar with the console, but...
Personally, I recommend two very good Ruby/Rails documentation sites:
apidock.com (no good search, but sometimes fine examples)
railsapi.com (very good AJAX search, plus you can customize what documentation you would like to see - by versions and by Gems)
Every iteration of the Rails guides (http://guides.rubyonrails.org/) has a ton of useful stuff in it. That should be the first stop.
After that I search away in the API - http://api.rubyonrails.org.
Sometimes I even end up just reading the source code trying to find things - https://github.com/rails/rails.
I think the best place in the source code to be reading is in here - https://github.com/rails/rails/tree/master/railties/lib/rails.
I upvoted each of the other answers here.
Can you great and knowledgable programmers please point me to some current and updated Ruby/Rails blogs/sites? I am also looking for an active forum for lively discussions on ruby/rails.
I already tried to google for them but as I already mentioned on SO, many of the links on google seem to be to sites that are no longer updated.
New website that started for rails developers: http://railsdeveloper.com/
Great blogs are: http://railstips.org/, http://railstutorial.org/
mislav created a cool tool at GoGaRuCo called explain ruby: http://explainruby.net/
screencasts: http://teachmetocode.com/screencasts/
I've found the following to be very useful:
Online forum: railsforum
IRC (instant answers): irc://irc.freenode.net/#rubyonrails
Video tutorials: railscasts
If you can't watch online videos: asciicasts
Rails Community page would be a nice start point for you.
I prefer RailsGuides and for asking questions and lively discussions I use SO (it is a great site, if you still don't use it, you should give it a try!)
For Ruby blog aggregators, there are ruby-blogs.com and rubycorner.com.
Does anybody know a basic plugin/gem that will allow me to quickly set up a blog in Rails.
I would like it to have a WYSIWYG editor that allows image upload and basic editing.
All the Google results I checked out were tutorials to creating a blog in Rails.
I'm not looking to roll out my own solution, I'm looking for something that was already made, like Wordpress, but for Rails.
Thanks!
Try using Mephisto
PS: Search for "rails blog engine" in Google and you will find many other hits.
Mephisto and typo used to be the mainstream, but there are many new kids on the block these days.
I've been looking on Github for a Rails project that allows anyone to sign in and add a blog entry.
Has anyone seen something like this?
TYPO is a blogging platform that uses Ruby on Rails:
https://github.com/fdv/typo/wiki looks to have the capability for multiple authors.
The article here gives a good overview of several other RoR blogging platforms that are out there.
IMHO this is quite easy to make. Especially if you use the twitter-auth gem. Just sign-in with your twitter account, write a post and be done with it.