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
sc_require('core'); | |
// Overall statechart for the application | |
Admin.statechart = Ki.Statechart.create({ | |
// Set tracing on to debug statecharts | |
trace: YES, | |
rootState: Ki.State.design({ |
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
:search => { | |
:keywords => 'asdfkljsdflkjsf', | |
:conditions => { | |
[:attribute => :name, :operator => '==', :value => 'xxx'], | |
[:attribute => :contacted_at, :operator => '>=', :value => 'xxx], | |
[:attribute => :contacted_at, :operator => '<=', :value => 'xxx] | |
} | |
} |
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
# here is a small piece of trickery to assign the remindable assoication | |
# when reminder_attributes=(attrs) is called. | |
# When using nested_attributes/build we have a problem in the reminder model | |
# since Todo.new(:reminder_attributes => {:something => :good}).reminder returns a reminder | |
# however Todo.new(:reminder_attributes => {:valid => :attributes}).reminder.remindable returns nil | |
# this alias sets the todo as the in memory object so the reminder can access the parent | |
def reminder_attributes_with_assign_todo=(reminder_attrs) | |
self.reminder_attributes_without_assign_todo = reminder_attrs.merge(:remindable => self) | |
end | |
alias_method_chain :reminder_attributes=, :assign_todo |
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
- search_form_for(@customer_search) do |form| | |
= form.keywords | |
= form.search_fields | |
= form.highlight_options | |
= form.conditions | |
= form.order_options | |
= form.pagination_options | |
= form.buttons |
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
undefined local variable or method `node' for #<Capybara::Driver::Node tag="a" path="/html/body/a"> (NameError) | |
./features/step_definitions/web_steps.rb:35:in `block (2 levels) in <top (required)>' | |
./features/step_definitions/web_steps.rb:14:in `with_scope' | |
./features/step_definitions/web_steps.rb:34:in `/^(?:|I )follow "([^"]*)"(?: within "([^"]*)")?$/' | |
features/sign_in_with_gitub.feature:5:in `Then I follow "Sign in with Github"' |
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
<fieldType name="text" class="solr.TextField" omitNorms="false"> | |
<analyzer> | |
<tokenizer class="solr.StandardTokenizerFactory"/> | |
<filter class="solr.StandardFilterFactory"/> | |
<filter class="solr.LowerCaseFilterFactory"/> | |
</analyzer> | |
</fieldType> |
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
module ApiHelper | |
def post_json(hash, path) | |
uri = URI.parse(@api_server.url(path)) | |
request = Net::HTTP::Post.new(uri.path) | |
request.content_type = 'application/json' | |
request.body = ActiveSupport::JSON.encode(hash) | |
response = Net::HTTP.new(uri.host, uri.port).start {|http| http.request(request) } | |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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" ?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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
Chatter.userController = SC.ObjectController.create( | |
/** @scope Chatter.userController.prototype */ { | |
loggedInAs: function(){ | |
return "Logged in as " + this.get('name'); | |
}.cacheable() | |
}) ; |