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 Company < ActiveRecord::Base | |
attr_accessible :address, :city, :contact_email, :contact_name, :fax_number, :name, :phone_number, :state, :zip | |
has_many :users | |
end | |
class User < ActiveRecord::Base | |
attr_accessible :company_id, :email, :enabled, :first_name, :last_name, :password, :username | |
belongs_to :company | |
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
public function getCountAction() { | |
$user = $this->getUser(); | |
$entities = $em->getRepository('EcsCrmBundle:Notifications')->findBy(array('sentTo'=>$user->getId(), 'dateAckknowledged' => 'NULL')); | |
$count = sizeof($entities); | |
} |
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 getNotificationsCount() { | |
$.ajax({ | |
url: '/notifications/count', | |
type:'GET', | |
success: function(response) { | |
if (response < 1) { | |
$('.nCount').hide(); | |
} else { | |
$('.nCount').text(response).show(); | |
} |
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
<VirtualHost *:80> | |
ServerName mysite.dev | |
ServerAlias www.mysite.dev | |
DocumentRoot /var/www/mysite.com/htdocs | |
<Directory /var/www/mysite.com/htdocs/> | |
Allow from all | |
</Directory> | |
RailsBaseURI / | |
RailsBaseURI /adm | |
<Directory /var/www/mysite.com/htdocs/www/> |
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
/** | |
* Adds support for magic finders. | |
* | |
* @return array|object The found entity/entities. | |
* @throws BadMethodCallException If the method called is an invalid find* method | |
* or no find* method at all and therefore an invalid | |
* method call. | |
*/ | |
public function __call($method, $arguments) | |
{ |
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
public function assignCaseManagerAction($id) { | |
$em = $this->getDoctrine()->getManager(); | |
$customer = $this->getCustomer($id); | |
$request = $this->getRequest(); | |
if (!$customer) { | |
throw $this->createNotFoundException('Unable to find Customer entity.'); | |
} |
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
jms_security_extra: | |
secure_all_services: false | |
expressions: true | |
security: | |
encoders: | |
Symfony\Component\Security\Core\User\User: plaintext | |
FOS\UserBundle\Model\UserInterface: sha512 | |
role_hierarchy: |
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
jms_security_extra: | |
secure_all_services: false | |
expressions: true | |
security: | |
encoders: | |
Symfony\Component\Security\Core\User\User: plaintext | |
FOS\UserBundle\Model\UserInterface: sha512 | |
role_hierarchy: |
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
fos_user: | |
db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel' | |
firewall_name: main | |
user_class: Fm\AdminBundle\Entity\Users |
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
jms_security_extra: | |
secure_all_services: false | |
expressions: true | |
security: | |
encoders: | |
Symfony\Component\Security\Core\User\User: sha512 | |
Fm\AdminBundle\Entity\Admins: sha512 | |