Rails "Badge" type plugin / tutorial?
Does anyone know if there is a Rails gem/plugin/tutorial that shows how to create a Badge/Achievement system similar to what stackoverflow uses. Thanks. ...
Does anyone know if there is a Rails gem/plugin/tutorial that shows how to create a Badge/Achievement system similar to what stackoverflow uses. Thanks. ...
I want to create a webservice that allows users to enter the longitude and latitude for a particular building. Buildings will belong to a broader category called a Region. If a specific building does not exist in a region the user could add the longitude and latitude data through the webservice. Similarly if a user finds data to be in...
As Anton points out (thanks Anton!) my problem is Association Caching in the tests and it seems like I did correctly create the nested_attribute in the Factory. The correct syntax is: Factory.define :job do |f| ... f.vehicles_attributes [{:vin => "1", :model => "ford", :make => "escort"},{:vin => "1", :model => "ford", :make => "es...
Here are the entire contents of activeresource.rb: require 'active_resource' Could someone explain the logic of this? Why not simply have activeresource.rb contain what active_resource.rb contains and forget about the additional require statement? ...
I am attempting to use the Sanitize method from ActionView. The line r_str = Helper.instance.sanitize(r_str, :tags => @@allowed_tags, :attributes => @@allowed_attribs) is giving me the error undefined method `white_list_sanitizer' for Parsers::HTML::Helper:Class This is my code in lib/parsers.rb module Parsers module HTML @@al...
I'm writing a form which is dealing with multiple models. Some examples of how to do this use ActionView::Helpers::FormHelper::label, and some use ActionView::Helpers::FormTagHelper::label_tag, and I don't really understand the difference. In my particular case, both seem to result in the same output: <% form_for :post, :url => { :act...
I have made a application and the logo appears on every page. All 3 of my layouts are copy and pasted to be identical. I have 2 partials linking to 2 pages in the same view folder and the logo works with one and doesn't with the other. It just displays the "alt" name of the <img>. Is there a way to fix this? ...
After having the unpleasant surprise that Comma Seperated Value (CSV) files are not necessarily comma-separated, I'm trying to find out if there is any way to detect what the regional settings list separator value is on the client machine from http request. Scenario is as follows: A user can download some data in CSV format from web sit...
I have a model called Profile which is belong_to User, so there is 'user_id' for the database to keep track of. In the local admin interface I made for this model I wanted to provide the flexibility of allowing admin to enter an username to a field in the editing screen, and then resolve that to user_id for saving in controller. However...
My rails app has couple of content generating resources like Article, Blog Posts, etc.. I can generate the RSS for each individual resource but I'm not getting how to synchronize into one RSS feed for these multiple feeds. Currently I've setup the Articles feed via FeedBurner and even FeedBurner doesn't have this facility to merge diff...
I'm using the Facebooker plugin in Rails to publish a user action to their newsfeed, but the image isn't being added. The call (via Net::HTTP.post_form) looks like this: Posting to http://api.facebook.com/restserver.php with {:api_key=>"4f5ed28f76142adsfasdf029c98ad", :template_bundle_id=>"107345673712", :template_data=>"{\"project\"...
I was looking at active_support.rb to try to understand the load process it uses. It uses three loading methods: load_all!, autoload and require. Why use three different ways of loading in the same file? module ActiveSupport def self.load_all! [Dependencies, Deprecation, Gzip, MessageVerifier, Multibyte, SecureRandom, TimeWithZon...
I have QuestionController I now have AnotherQuestionController with actions which should render using templates and partials in app/views/question/ Is this possible? Seems like it should be. I've tried render :template => "question/answer" but answer.html.erb includes partials and I get errors like "Missing template another_questi...
I'm starting a new job soon where I'm going to be developing in Ruby and Rails on a Windows machine. I haven't used Windows for years, and the likes of Textmate, Git and Bash, are an integral part of the workflow using a Mac. So, does anybody have any suggestions or recommendations as to the best tools or work strategies to use? Or pitf...
How can you display the hierarchy of 'require's that take place in a Ruby app? Some files require files which require additional files. However, by running an application in debug mode you only trigger a subset of required files - only the ones that are used by whatever subset of functionality your application is using at any given poi...
I have a method in my ApplicationController that is part of a before_filter. How do I identify which controller is calling that method and can I pass arguments to it? Presumably worst case, I can create a new object where I use controller names and values, then call it directly in the before_filter method with NewObject.find(:first, :c...
Alright. So I have a table called contacts. In this table I have people and there contact information and how their preferred method of contact (Phone, Address, Email, or Fax). I want to be able to have ruby output a list of said people in a manner I could copy paste into a email address bar or such. <% @contacts.each do |contact| %> ...
I admit that I don't follow much of anything "right" on deploying test versus production code. I have been using ASP.NET, and I typically run it locally in Visual Studio, it works, I upload it, I test it again on the production server. I have read several people say that deploying Rails apps is harder and there are special programs/way...
Hello, I run an Ubuntu 8.04 shared host (VMWare) with Apache + Passenger (= Mod Rails), MySQL and Acts_As_Ferret (in server mode). It's too slow at the first requests. I do a lot of REST operations on it and have very few users. Now I want to do a fresh installation... Which setup (based on Ubuntu) do you recommend for a really snappy...
I'm sending out a lot of emails in my latest rails app. I want to A/B test subject lines in the emails that go out. ideally i can capture two things. 1- open rate 2- whether the call to action in the email is clicked any ideas on how to do this? i don't think (the great) 7 minute abs (http://github.com/paulmars/seven_minute_abs/tree...