-
The new rake task assets:clean removes precompiled assets. [fxn]
-
Application and plugin generation run bundle install unless
--skip-gemfile
or--skip-bundle
. [fxn] -
Fixed database tasks for jdbc* adapters #jruby [Rashmi Yadav]
-
Template generation for jdbcpostgresql #jruby [Vishnu Atrai]
class MatchMaker | |
# This method matches the volunteers with the request criteria and notifies them through | |
# email and sms. Volunteers can accept this request by clicking on a link sent in the email | |
# or sending an sms to <NO>. | |
# | |
# The student can freeze on a volunteer by clicking on a link provided next to the volunteer | |
# details and close this request. | |
# | |
# Then the actual searching starts by building the criteria for search. Various search scopes | |
# are merged together to form complete search criteria which is passed on to Oracle to do the |
<% if @home_visit.errors.any? %> | |
/* Hide the flash notice div */ | |
$("#flash_notice").addClass('hidden') | |
/* Update the html of the div phone-call-errors with the new one */ | |
$("#home_visit_errors").html("<%= escape_javascript(errors_for(@home_visit).html_safe) %>"); | |
/* show the div phone-call-errors */ | |
$("#home_visit_errors").removeClass('hidden'); | |
<% else %> |
source 'https://rubygems.org' | |
gem 'rails', '3.2.1' | |
gem 'haml-rails' | |
gem 'rails-backbone' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
group :development, :test do |
#------------------------------------------------------------------------------- | |
# This module is meant to be included in the Base class of an STI model | |
# hierarchy. | |
# | |
# Heavily inspired by a couple key blog posts | |
# http://code.alexreisner.com/articles/single-table-inheritance-in-rails.html | |
# http://coderrr.wordpress.com/2008/04/22/building-the-right-class-with-sti-in-rails/#comment-1826 | |
# | |
# Thanks to Alex and coderrr! | |
#------------------------------------------------------------------------------- |
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
<%= form_for(@user) do |f| %> | |
<% if @user.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2> | |
<ul> | |
<% @user.errors.full_messages.each do |msg| %> | |
<li><%= msg %></li> | |
<% end %> | |
</ul> |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
# The output is double the input value | |
ActiveSupport::SecureRandom.hex(3) |
-
The -j option of the application generator accepts an arbitrary string. If passed "foo", the gem "foo-rails" is added to the Gemfile, and the application JavaScript manifest requires "foo" and "foo_ujs". As of this writing "prototype-rails" and "jquery-rails" exist and provide those files via the asset pipeline. Default is "jquery". [fxn]
-
jQuery is no longer vendored, it is provided from now on by the jquery-rails gem. [fxn]
-
Prototype and Scriptaculous are no longer vendored, they are provided from now on by the prototype-rails gem. [fxn]
-
The scaffold controller will now produce SCSS file if Sass is available [Prem Sichanugrist]