-
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]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getParameterByName( name ) { | |
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); | |
var regexS = "[\\?&]"+name+"=([^&#]*)"; | |
var regex = new RegExp( regexS ); | |
var results = regex.exec( window.location.href ); | |
if( results === null ) | |
return ""; | |
else | |
return decodeURIComponent(results[1].replace(/\+/g, " ")); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#default_scope will interrupt the update_attributes on the AR outside the default_scope, below solution will work. | |
#with_exclusive_scope is protected, so you have to create a class method: | |
def self.include_deleted_in | |
Post.with_exclusive_scope { yield } | |
end | |
#then in your controller call |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
signInModal = -> | |
console.log("in modal 01") | |
$( "#sign_in_modal" ).dialog | |
modal: true | |
autoOpen: $("body").hasClass("show_login") | |
resizable: false | |
minWidth: 400 | |
$("a.login, a#login_link").click => | |
console.log("in modal 02") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function signInModal(){ | |
$( "#sign_in" ).dialog({ | |
modal: true, | |
autoOpen: $("body").hasClass("show_login"), | |
resizable: false, | |
minWidth: 400 | |
}); | |
$("a.login, a#login_link").click(function(){ | |
$( "#sign_in" ).dialog("open"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.extend | |
myplugin: (options) -> | |
self = $.fn.myplugin | |
opts = $.extend {}, self.default_options, options | |
$(this).each (i, el) -> | |
self.init el, opts | |
self.log el if opts.log | |
$.extend $.fn.myplugin, | |
default_options: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage: | |
# link_to_next_page(@items) | |
# link_to_next_page(@items, :remote => true) # Ajax | |
def link_to_next_page(scope, name, options = {}, &block) | |
param_name = options.delete(:param_name) || Kaminari.config.param_name | |
link_to_unless scope.last_page?, name, {param_name => (scope.current_page + 1)}, options.merge(:rel => 'next') do | |
block.call if block | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RuntimeError in GroupsController#create | |
ProfilePhoto#content_type delegated to photo.content_type, but photo is nil: #<ProfilePhoto id: nil, user_id: 6, owner_id: 5, owner_type: "Group", title: nil, description: nil, upload_id: nil, status: "processed", created_at: nil, updated_at: nil, size: nil, height: nil, width: nil, filename: nil, content_type: nil, parent_id: nil, photo_id: nil> | |
Rails.root: /Users/andy/intridea.workspace/recnation | |
Application Trace | Framework Trace | Full Trace | |
vendor/gems/ss_photos/app/models/profile_photo.rb:26:in `rescue in content_type' | |
vendor/gems/ss_photos/app/models/profile_photo.rb:23:in `content_type' | |
(eval):25:in `image_content_type' | |
activemodel (3.1.0.rc4) lib/active_model/validator.rb:151:in `block in validate' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
date_obj = new Date(); | |
date_obj_hours = date_obj.getHours(); | |
date_obj_mins = date_obj.getMinutes(); | |
if (date_obj_mins < 10) { date_obj_mins = "0" + date_obj_mins; } | |
if (date_obj_hours > 11) { | |
date_obj_hours = date_obj_hours - 12; | |
date_obj_am_pm = " PM"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# see http://forrst.com/posts/Setting_up_SASS_on_Heroku-4dZ | |
# You can put this in config/initializers/sass.rb | |
# Setup directory in tmp/ to dump the generated css into | |
require "fileutils" | |
FileUtils.mkdir_p(Rails.root.join("tmp", "stylesheets", "generated")) | |
# Tell SASS to use the .sass files in public/stylesheets/sass and | |
# output the css to tmp/stylesheets/generated |