Created
July 11, 2012 01:51
-
-
Save laspluviosillas/3087439 to your computer and use it in GitHub Desktop.
This file contains 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 InventoriesController < ApplicationController | |
before_filter :authenticate_login! | |
def index | |
@page_title = "Course Administration" | |
@inventories = Inventory.where(:account_id => current_account.id) | |
.joins(:course) | |
.select("inventories.*, courses.name as course_name") | |
end | |
def show | |
@inventory = Inventory.find(params[:id], :joins => :course, :select => "inventories.*, courses.name as course_name") | |
@page_title = "Assign Units to " + @inventory.course_name | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment