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
# add gems | |
gem 'whenever' | |
gem 'kaminari' | |
gem 'hpricot' | |
gem 'ruby_parser' | |
gem 'jquery-rails' | |
gem "jquery-ui-rails" | |
gem 'bcrypt-ruby', '~> 3.0.0' | |
gem "rspec-rails", :group => [ :development, :test ] | |
gem "ffaker", :group => :test |
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
Index: lib/trestle/adapters.rb | |
autoload :ActiveRecordAdapter | |
autoload :DraperAdapter | |
+ autoload :SequelAdapter | |
class Adapter | |
attr_reader :admin | |
Index: lib/trestle/attribute.rb | |
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
Sequel::Model.plugin :active_model | |
module Trestle | |
module Adapters | |
module SequelAdapter | |
def collection(params={}) | |
admin.model.dataset | |
end | |
def find_instance(params) |
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
Index: app/helpers/trestle/auth/user_helper.rb | |
def avatar_for(user) | |
- avatar { instance_exec(user, &Trestle.config.auth.avatar) } if Trestle.config.auth.avatar | |
+ Trestle::ApplicationController.helpers.avatar { instance_exec(user, &Trestle.config.auth.avatar) } if Trestle.config.auth.avatar | |
end | |
end | |
Index: app/views/trestle/auth/_userbox.html.erb | |
<div class="userbox pull-right dropdown"> | |
<%= link_to "#", class: 'dropdown-toggle', data: { toggle: 'dropdown' } do %> |