I hereby claim:
- I am snreid on github.
- I am snreid (https://keybase.io/snreid) on keybase.
- I have a public key ASArq2ZIxQoW8_DrxxVPxcKAmEQbEeyBAJupXfFWiitmGQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I ran into an issue recently where I restyled a page with a searchable table and broke the plugin it was using. I replaced the plugin for Jquery DataTables, but I wanted the page to look the same, so I didn't want to use the built-in search box that DataTables comes with.
After a lot of digging around I found my solution.
##The Javascript
$(document).ready(function(){
var table = $('#person_listing').DataTable();
//DataTable custom search field
http://robots.thoughtbot.com/how-rails-works-type-casting I found this link very helpful.
I was having an issue validating a date. I needed the date to either match my format or be empty.
Here's what my validation looked like:
validate :expiration_date, format:{with: /(19|20)\d\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])/}, allow_nil: true
If you have to build a new release of ArchivesSpace, and have a custom plugin that you want to include in that build (so you don't have to manually copy and paste it in) here's how to do it.
In the build/ directory there is a file called build.xml. This controls a lot of stuff when you build a release, including which plugins are added to the zipped end result.
There are 'mkdir' commands that are executed and included in the release. For us this is around line 400 of this build.xml file, just after this text
...
<!-- Dist build -->
ls -al | |
cd | |
pwd | |
mv folder/file new-folder/ | |
sudo !! (after I’ve realized for the zillionth time I didn’t run the command as sudo) | |
cp file.txt new-folder/ |
#!/bin/bash | |
# First parameter is the handle of the collection, e.g. '1811/12345' | |
# Second parameter is the directory that contains our batch, | |
# which should include the SimpleArchiveFormat directory. | |
# Usage example: | |
# ./import-saf-2dsp.sh 1811/12345 /mnt/common/dspace/OARDC_bulletin_PDF | |
# The 'mapfile' and 'log' will be new files created by this process. | |
# The 'mapfile' is used if something goes wrong to delete the batch, see 'delete.sh'. |
##Create, Merge, Delete Branch
Create new branch:
git checkout -b new_branch
Push new branch:
git push origin new_branch
#In your gemfile add: | |
gem 'savon', '~>2.0' | |
#In your model (or service; whatever is appropriate for your app): | |
def self.get_response(method, message) | |
client = Savon.client( | |
wsdl: 'https://Your-WSDL-URL.com/service.wsdl', | |
#This is optional. I needed it to send credentials with custom xml. Custom XML will be nested in the <header></header> tags. | |
soap_header: '<custom-xml-header></custom-xml-header>', |