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
%ul | |
= @listings.inspect | |
- @listings.each do |l| | |
%li | |
= l | |
%span= link_to "Delete This Batch", boss_listing_path(l), :method => :delete, :confirm => "Are you SURE you want to delete all listings with this identifier? This cannot be undone." |
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 destroy | |
@listings = Listing.where(:listing_name => params[:listing_name]) | |
@listings.destroy | |
redirect_to organizations_url, :notice => "Successfully destroyed this group of listings." | |
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
class Ability | |
include CanCan::Ability | |
def initialize user, options = {} | |
user ||= User.new | |
role_call = ["admin", "boss", "exporter", "member"] | |
role_call.each do |r| | |
if user.roles.has?(r) | |
"#{r}" + _rules | |
else |
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 Ability | |
include CanCan::Ability | |
def initialize(user, options = {}) | |
user ? user_rules : guest_rules | |
end | |
def user_rules | |
user.roles.each { |role| exec_role_rules(role) if user.roles.include? role } | |
default_roles |
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
<h2>Sign up</h2> | |
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> | |
<%= devise_error_messages! %> | |
<% f.object.build_organization unless f.object.organization %> | |
<% f.fields_for :organization do |o| %> | |
<p><%= o.label :name %><br/> | |
<%= o.text_field :name %></p> |
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 AddDeviseToUsers < ActiveRecord::Migration | |
def self.up | |
change_table :users do |t| | |
t.recoverable | |
t.rememberable | |
t.trackable | |
t.validatable | |
t.lockable | |
t.timeoutable | |
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
tcp 0 0 0.0.0.0:27017 0.0.0.0:* LISTEN 26364/mongod | |
tcp 0 0 0.0.0.0:28017 0.0.0.0:* LISTEN 26364/mongod | |
tcp 0 0 50.57.132.151:27017 50.57.132.151:44988 ESTABLISHED 26364/mongod | |
unix 2 [ ACC ] STREAM LISTENING 2929563 26364/mongod /tmp/mongodb-27017.sock |
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
Mode | Meaning | |
-----+-------------------------------------------------------- | |
"r" | Read-only, starts at beginning of file (default mode). | |
-----+-------------------------------------------------------- | |
"r+" | Read-write, starts at beginning of file. | |
-----+-------------------------------------------------------- | |
"w" | Write-only, truncates existing file | |
| to zero length or creates a new file for writing. | |
-----+-------------------------------------------------------- | |
"w+" | Read-write, truncates existing file to zero length |
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 Blurb < ActiveRecord::Base | |
default_scope :order => 'weight ASC' | |
has_many :contents, | |
:foreign_key => "blurb_id", | |
:dependent => :destroy | |
has_many :pages, :through => :contents | |
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
c3583c6 HEAD@{0}: checkout: moving from master to c3583c6 | |
2635ee1 HEAD@{1}: commit: I may have broken something, checking... |