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
# encoding: utf-8 | |
class DocumentUploader < CarrierWave::Uploader::Base | |
# http://stackoverflow.com/questions/29624223/papertrail-doesnt-play-nice-with-carrierwave-and-remove-previously-stored-file | |
#configure do |config| | |
# config.remove_previously_stored_files_after_update = false | |
#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
function matcher (params, data) { | |
// Always return the object if there is nothing to compare | |
if ($.trim(params.term) === '') { | |
return data; | |
} | |
// MOVE THIS UP SO IF THE GROUP HITS A MATCH IT DOES NO SEARCH THE CHILDREN | |
var original = stripDiacritics(data.text).toUpperCase(); | |
var oldterm = stripDiacritics(params.term).toUpperCase(); | |
// Check if the text contains the term |
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
GIT | |
remote: git://github.com/activeadmin/activeadmin.git | |
revision: 4349a2237894aae45569c5a7d25488081ba2d32f | |
specs: | |
activeadmin (1.0.0.pre2) | |
arbre (~> 1.0, >= 1.0.2) | |
bourbon | |
coffee-rails | |
formtastic (~> 3.1) | |
formtastic_i18n |
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
# /config/initializers/active_admin.rb | |
ActiveAdmin.setup do |config| | |
# == User Authentication | |
# | |
# Active Admin will automatically call an authentication | |
# method in a before filter of all controller actions to | |
# ensure that there is a currently logged in admin user. | |
# | |
# This setting changes the method which Active Admin calls |
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
The idea here is that I have a single User login that can eventually be tied to multiple Companies via the Role. | |
You signup via Devise on the custom /register route and fillout the Company information etc. The custom registration controller creates the Role during the user creation and sets a few other attributes. | |
It all worked but now it's broken and I have no idea what I did to break it. | |
When I try to create a new user / company the additional user fields (name_first & name_last) always fail validation regardless if they are in fact valid. The nested Company fields do not validate at all. If I enter the email and password field only the form works but only creates the User record. | |
To me it seems like the custom registration controller is not being processed at all. |