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
# Hi! I'am rack middleware! | |
# I was born for show right way to you JavaScript | |
# My author's name was Aleksandr Koss. Mail him at [email protected] | |
# Nice to MIT you! | |
require(File.dirname(__FILE__) + '/../config/environment') unless defined?(Rails) | |
class RoutesJs | |
def initialize app, options = {} |
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 Import | |
require 'activerecord-import/mysql' | |
def self.import_test | |
names = [] | |
models =[] | |
1000.times do | |
name = Faker::Name.name | |
names.push [name] | |
models.push User.new :name => name |
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
updated_at: | |
has_error: | |
value_decimal: | |
value_integer: | |
database_field_id: 83 | |
value_date: | |
trust_rate: 0 | |
- !ruby/ActiveRecord:EntryValue | |
attributes: |
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 'rubygems' | |
require 'mysql' | |
db = Mysql.new('localhost', 'root', '', 'ngforms_development') | |
begin | |
insert_new_entry = db.prepare "INSERT INTO entry_values(value_string, value_integer, value_decimal) VALUES (?, ? ,?)" | |
insert_new_entry.execute 'aizatto', '20', '20.23' |
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
MATCH NAME: NAME_TELEPHONE_NUMBER | |
SQL (0.5ms) SELECT COUNT(*) AS count_id FROM `database_fields` WHERE (`database_fields`.`database_id` = 30) AND (`database_fields`.`field_type_id` = 9) | |
DatabaseField Load (0.4ms) SELECT `database_fields`.* FROM `database_fields` WHERE (`database_fields`.`database_id` = 30) AND (`database_fields`.`field_type_id` = 9) | |
EntryValue Load (1.1ms) SELECT `entry_values`.* FROM `entry_values` WHERE (`entry_values`.`entry_id` = 1202) AND (`entry_values`.`database_field_id` = 77) LIMIT 1 | |
DatabaseField Load (0.4ms) SELECT `database_fields`.* FROM `database_fields` WHERE (`database_fields`.`id` = 77) LIMIT 1 | |
FieldType Load (0.4ms) SELECT `field_types`.* FROM `field_types` WHERE (`field_types`.`id` = 9) LIMIT 1 | |
Multiple_fields_criteria: keep_order | |
EntryValue Load (0.5ms) SELECT `entry_values`.* FROM `entry_values` WHERE (`entry_values`.`entry_id` = 1398) AND (`entry_values`.`database_field_id` = 77) LIMIT 1 | |
DatabaseField Load (0.4ms) SELECT `database_fields`.* FROM `dat |
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
views: | |
default_per_page: 10 | |
mask: | |
decimal: | |
delimiter: | |
with_comma: "comma_delimiter" | |
with_point: "point_delimiter" | |
negative: | |
signal: "signal" | |
parenthesis: "parenthesis" |
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
/Users/raphael/.rvm/gems/ree-1.8.7-2010.02@rails3/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_pool.rb:330:in `retrieve_connection': ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished) | |
from /Users/raphael/.rvm/gems/ree-1.8.7-2010.02@rails3/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_specification.rb:103:in `retrieve_connection' | |
from /Users/raphael/.rvm/gems/ree-1.8.7-2010.02@rails3/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_specification.rb:95:in `connection' | |
from /Users/raphael/.rvm/gems/ree-1.8.7-2010.02@rails3/gems/arel-0.4.0/lib/arel/engines/sql/engine.rb:10:in `connection' | |
from /Users/raphael/.rvm/gems/ree-1.8.7-2010.02@rails3/gems/arel-0.4.0/lib/arel/engines/sql/relations/table.rb:20:in `initialize' | |
from /Users/raphael/.rvm/gems/ree-1.8.7-2010.02@rails3/gems/activerecord-3.0.0.beta4/lib/active_record/base.rb:932:in `new' | |
from /Users/raphael |
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 jquery_include_tag | |
if Rails.env == "production" | |
javascript_include_tag "jquery.min" | |
else | |
javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" | |
end | |
end |
NewerOlder