What happened to the "on Github" rails API documentation links? - ruby-on-rails

A few months ago there was a feature in the Rails API documentation that let you visit the a Rails source file on Github by clicking "on Github". Ryan Bates even tweeted about it. This was a great feature because you could easily explore the source for the entire file instead of just for a single method.
Does anyone know what happened to this feature?

I believe they removed them when they started using Ajax for the show. This happened when they switched to sdoc. Perhaps its an sdoc limitation, as everyone seemed to enjoy it.
I would recommend posting on the google group and get a discussion going requesting more information and/or getting them back.
You can find the group here.

Rails documentation generated from using the standard Rdoc Rake task provided with the rails source still produces this extra link to github.
There's still a flag for it in the rakefile.
Whatever or whoever generates the documentation for the API must be omitting this flag.

It looks like the github links are back as of Rails 3.2.0!

Related

Setting up ruby on rails gem ga_events

I am relatively new to web dev and I am trying to set up the ruby on rails gem ga_events (https://github.com/Nix-wie-weg/ga_events). I am doing this because I need to have google analytics event tracking within controllers and this gem seems like a good way to do it. The issue I am having is where the readme says, "After requiring ga_events.js, you have to choose an adapter." I am using Google Universal Analytics and thus I would like to choose that one. It doesn't say specifically how to do this. Where do I put that code block (https://github.com/Nix-wie-weg/ga_events#google-universal-analytics-analyticsjs)? Do I need to make a new file somewhere?
I'm assuming it's obvious for a more experienced developer. More detailed instructions+explanation would be really helpful. Thanks.
I'm using Rails 4.0.13 and Ruby 2.0.0p643.
I was having the same issue here! Turns out, it is just javascript code.
I put mine under application.js since it's a code that need to be on every page.

How to post in a blog without command prompt when using octopress in rails?

I am using octopress gem for implementing blog using ruby on rails. I got some code from
http://www.nickhammond.com/setting-octopress-jekyll-blog-rails-application/
and its work fine.
But my question is for creating a new post every time I have to write code in command prompt like
rake new_post['Hello World']
rake generate
I want something like admin panel where should be textbox, textare and submit button. and when I click on submit button it should be posted. Is it possible to create here using octopress? Please share with me, Thank you.
You're looking at a tool like this.
I haven't used it personally, but that's what I get from a simple Google search.
Personally, I'm using GitHub Pages for my Octopress stuff - I was looking for the same sorta thing you're looking for, and came across this. Obviously this is only handy if you're using GitHub for source, but you could edit your source using Prose, acting as a nice Markdown-friendly interface, and then use something like Travis-CI to compile and deploy.
I haven't set this up yet myself though, so I can't speak from experience. But I plan to. :D

Old version of recaptcha get displayed instead of the newer version using the rails gem "Recaptcha"

Thanks to the gem https://github.com/ambethia/recaptcha/ (version 0.3.6), I managed to integrate Google Recaptcha into my rails app. The problem is that only the old version (V1) is displayed, similar to below.
However, I would prefer to the newer version with the checkbox like below, which is much easier for the users. Any idea how to get there?
There is some discussion about this, see: https://github.com/ambethia/recaptcha/issues/112
You are free to implement the new API by yourself it's not that hard actually, and if you have the knowledge submit a pull request to the original repository with a working solution :-)
The instructions on how to implement reCaptcha can be found here: http://www.google.com/recaptcha/intro/index.html

How to be notified when new Ruby or Rails releases are made?

anybody know a way to just get emailed when new versions of Ruby and Rails are released? They have mailing lists and Ruby on Rails has a twitter, but i dont want all the noise that comes with those, i just want to know when a new releases are made, especially ones with security fixes.
Get the feed from the rails blog. http://weblog.rubyonrails.org/feed/atom.xml
Follow Rails at VersionEye and you will receive an email as soon the next version will be released.
http://www.versioneye.com/ruby/rails/4.0.0
And You can customize your own RSS Feed to get notified about new versions. Currently you can follow more than 220K open source projects.
By the way. I work at VersionEye. Let me know if you have questions ;-)
You could try this service: http://gemnotifier.org/
It will send you an email whenever a new version of a particular gem is released.
Your best bet is to subscribe to rubyonrails-security. There's also rubyonrails-talk, but that's much noisier.
You can use IFTTT with "RSS to E-mail"
I have shared a recipe:
https://ifttt.com/recipes/66069
Gemnasium is a great online tool to monitor your project dependencies. You can sync your Github repos or upload Gemfiles of the projects which dependencies you'd like to monitor.

Well built rails code for download

I want to get into rails by examining well built code
where can i find typical open source rails project that i can download
and learn from ?
i'm interested in facebook connect integration (facebooker), tag clouds, searching in
my website
I'm not looking not tutorials or screen casts
Thanks!
This question gives a good list
a list of projects with good test-suites
a list of open source rails apps to learn from
Have a browse of ruby tool box and download some open source. For example there's refinery and zena, two content management systems and Rboard, a forum. Depends what you want really but there's plenty out there. Ruby toolbox entries are ordered by github watchers and forks to give you an idea of their popularity.
I really like looking at the commits in teambox.
I find it a bit more complicated. But there's also spree.
There's also devise which is really interesting to look at too.
Finally, I'd recommend you to follow the rails commits (it's the only commits feed I have in my Google Reader).
Gady, this is an extremely rich topic you're asking about and resources are all over the internet. Try starting at http://rubyonrails.org/.
You should be able to find tens of questions just like yours (asked and answered) by searching SO at the top bar.
For Rails, part of it is the building process, so one feasible approach is to read a tutorial like http://railstutorial.org/book
then when in Chapter 2, you will use Scaffold, and at that time, you will have some basic code to look into how a basic Rails app is.
I also suggest you use source control like Git, Mercurial, or SVN to commit different phases of the project, from creating the rails project and then after each step, so you can diff what the changes are during each step.
If you already have Ruby 1.9.2, Rails 3.0.1, and sqlite3, then you can
rails new myproj
cd myproj
rails generate scaffold foo name:string salary:integer gpa:float note:text
rake db:migrate
rails server
and now you can use http://localhost:3000/foos to create, display, update, delete the foo records, and have quite a bit of source code to look at. Most of the customizable code is in app, with css and javascript in the public folder.
Ryan Bates has an excellent series of videos.
http://railscasts.com/
An extremely valuable resource.
Radiant is a CMS that you can download for free and see how it works. It is a great piece of code to look at and see how it works.
I guess that most open source Rails projects are shared on Github, so it may be interesting to browse its Ruby section and look for most watched or most forked projects:
http://github.com/languages/Ruby
Steady stream of new interesting projects to take a look at :)
And don't forget the official:
guides.rubyonrails.org
well there is one "bigger" project on github, waiting for downloading and contribution...
but it's a little controversial because of the security issued they have (had?)
It's still worth a look:
http://github.com/diaspora/diaspora

Resources