This file contains hidden or 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
| require 'spec_helper' | |
| describe OpenQuestionnaire::Question::Item do | |
| let(:item) { OpenQuestionnaire::Question::Item.new } | |
| context 'before create' do | |
| it 'should set position' do | |
| item.should_receive :set_position | |
| item.save | |
| end |
This file contains hidden or 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
| class OpenQuestionnaire::Group < ActiveRecord::Base | |
| set_table_name :open_questionnaire_groups | |
| belongs_to :open_questionnaire, :class_name => 'OpenQuestionnaire::Base' | |
| has_many :questions, :dependent => :destroy, :order => :position | |
| has_many :condition_questions, :class_name => 'OpenQuestionnaire::Question::ItemQuestion::Condition' | |
| acts_as_list :scope => :open_questionnaire | |
| validates_presence_of :name, :unless => Proc.new {|group| group.new_record? } | |
| validates_uniqueness_of :name, :scope => :open_questionnaire_id |
This file contains hidden or 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
| class OpenQuestionnaireGroupsController < ApplicationController | |
| before_filter :get_resource, :except => :create | |
| before_filter( | |
| :find_group_by_group_id, | |
| :only => [:get_options_for_condition, :get_next_group_select, :update_next_group] | |
| ) | |
| def show | |
| respond_to do |format| | |
| format.js { render :partial => 'group', :object => @open_questionnaire_group } |
This file contains hidden or 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
| = render 'sidebar' | |
| #main | |
| = render 'tabs' | |
| - scope = TranslationScope.new :value => 'pages.answering_accounts' | |
| .data | |
| .generic-data.answering-interfaces | |
| .tab-1 | |
| .pie | |
| %table |
This file contains hidden or 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
| /* Reset / Mixins / Jquery-ui / Common | |
| /* ------------------------------------------------------------- | |
| @import 'reset' | |
| @import 'mixins' | |
| @import 'jquery-ui' | |
| @import 'common' | |
| /* Content | |
| /* ------------------------------------------------------------- |
This file contains hidden or 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
| import java.io.BufferedInputStream; | |
| import java.io.DataOutputStream; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.net.HttpURLConnection; | |
| import java.net.URL; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import android.graphics.Bitmap; |
This file contains hidden or 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 parse(data) | |
| if !data.respond_to?(:read) | |
| data = StringIO.new(data || '') | |
| end | |
| if data.eof? | |
| {} | |
| else | |
| silence_warnings { require 'rexml/document' } unless defined?(REXML::Document) |
This file contains hidden or 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 parse(data) | |
| if !data.respond_to?(:read) | |
| data = StringIO.new(data || '') | |
| end | |
| if data.eof? | |
| {} | |
| else | |
| return rand | |
| silence_warnings { require 'rexml/document' } unless defined?(REXML::Document) |
This file contains hidden or 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
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
| raise e | |
| end | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| gem 'rails', github: 'rails/rails' |
This file contains hidden or 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
| pragma solidity ^0.4.16; | |
| contract ERC20Basic { | |
| uint256 public totalSupply; | |
| function balanceOf(address who) constant returns (uint256); | |
| function transfer(address to, uint256 value) returns (bool); | |
| event Transfer(address indexed from, address indexed to, uint256 value); | |
| } | |
OlderNewer