# GET /thumbs
# GET /thumbs.xml
def index
- @search = Thumb::Search.new(params[:search])
- @thumbs = Thumb.paginate(@search.find_options.merge(:page => params[:page]))
+ @search = Record::Thumb::Search.new(params[:search])
+ @thumbs = Record::Thumb.paginate(@search.find_options.merge(:page => params[:page]))
respond_to do |format|
format.html # index.html.erb
# GET /thumbs/1
# GET /thumbs/1.xml
def show
- @thumb = Thumb.find(params[:id])
+ @thumb = Record::Thumb.find(params[:id])
respond_to do |format|
format.html # show.html.erb
# GET /thumbs/new
# GET /thumbs/new.xml
def new
- @thumb = Thumb.new
+ @thumb = Record::Thumb.new
respond_to do |format|
format.html # new.html.erb
# GET /thumbs/1/edit
def edit
- @thumb = Thumb.find(params[:id])
+ @thumb = Record::Thumb.find(params[:id])
end
# POST /thumbs
# POST /thumbs.xml
def create
- @thumb = Thumb.new(params[:thumb])
+ @thumb = Record::Thumb.new(params[:thumb])
@thumb.video_id = params[:thumb].delete(:video_id)
respond_to do |format|
if @thumb.save
- flash[:notice] = 'Thumb was successfully created.'
+ flash[:notice] = 'Record::Thumb was successfully created.'
format.html { redirect_to(@thumb) }
format.xml { render :xml => @thumb, :status => :created, :location => @thumb }
else
# PUT /thumbs/1
# PUT /thumbs/1.xml
def update
- @thumb = Thumb.find(params[:id])
+ @thumb = Record::Thumb.find(params[:id])
respond_to do |format|
if @thumb.update_attributes(params[:thumb])
- flash[:notice] = 'Thumb was successfully updated.'
+ flash[:notice] = 'Record::Thumb was successfully updated.'
format.html { redirect_to(@thumb) }
format.xml { head :ok }
else
# DELETE /thumbs/1
# DELETE /thumbs/1.xml
def destroy
- @thumb = Thumb.find(params[:id])
+ @thumb = Record::Thumb.find(params[:id])
@thumb.destroy
respond_to do |format|
<tbody>
<% @arc.thumbs.each do |thumb| %>
<tr class="<%= cycle('odd', 'even') %>">
- <td><%=link_to thumb.video_id, thumb %></td>
+ <td><%=link_to thumb.video_id, thumb_path(thumb) %></td>
<td><%= thumb.title %></td>
<td><%= truncate(thumb.description) %></td>
</tr>
<tbody>
<% @thumbs.each do |thumb| %>
<tr class="<%= cycle('odd', 'even') %>">
- <td><%=link_to thumb.video_id, thumb %></td>
+ <td><%=link_to thumb.video_id, thumb_path(thumb) %></td>
<td><%= thumb.title %></td>
<td><%= truncate(thumb.description) %></td>
</tr>