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
def update | |
@membership = Membership.find(params[:id]) # this line sits in before_filter | |
raise ActiveRecord::RecordNotFound unless @membership.group_owner == current_user # ignore_rbp | |
is_admin = params[:membership] && params[:membership][:is_admin] | |
@membership.update_attribute(:is_admin, is_admin) unless is_admin.nil? | |
redirect_to @membership.group | |
end | |
# RBP advices to use scope access on the second line of the method, but it's impossible in my model, | |
# so I've added the comment that makes RBP ignore that error |
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
call pathogen#runtime_append_all_bundles() | |
" language messages en | |
set encoding=utf-8 | |
if has('win32') | |
set guifont=Monaco:h10:cRUSSIAN | |
else | |
set guifont=Monaco\ 11 | |
end | |
" base for vimrc file taken from http://biodegradablegeek.com/2007/12/using-vim-as-a-complete-ruby-on-rails-ide/ |
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
#!/bin/sh | |
left_sum=$((`git log -1 --format=format:%H | cut -c -20 | sed -e 's/[a-f0-9]/\+0x&/g'`)) | |
right_sum=$((`git log -1 --format=format:%H | cut -c 21- | sed -e 's/[a-f0-9]/\+0x&/g'`)) | |
if [ $left_sum = $right_sum ]; then | |
echo '****************************************' | |
echo '* Congratulations! Lucky commit!!! *' | |
echo '****************************************' | |
fi |
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
<?xml version="1.0" encoding="utf-8"?> | |
<project default="fixcrlf" basedir="."> | |
<target name="fixcrlf" description="Fix CRLF"> | |
<fixcrlf srcdir="${basedir}" includes="**/*.as **/*.xml **/*.properties **/*.pbk" eol="lf" eof="remove" encoding="utf8"/> | |
</target> | |
</project> |
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
package | |
{ | |
import flash.display.Sprite; | |
import flash.events.Event; | |
import flash.text.TextField; | |
[SWF(width="800",height="600",frameRate="120",backgroundColor="#ffffff")] | |
public class PerformanceTest extends Sprite | |
{ | |
private static const LIMIT:int = 10000; |