Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 2431 Bytes
1 | class <%= controller_class_name %>Controller < ApplicationController |
2 | # GET /<%= table_name %> |
3 | # GET /<%= table_name %>.xml |
4 | def index |
5 | @<%= table_name %> = <%= class_name %>.all |
6 | |
7 | respond_to do |format| |
8 | format.html # index.html.erb |
9 | format.xml { render :xml => @<%= table_name %> } |
10 | end |
11 | end |
12 | |
13 | # GET /<%= table_name %>/1 |
14 | # GET /<%= table_name %>/1.xml |
15 | def show |
16 | @<%= file_name %> = <%= class_name %>.find(params[:id]) |
17 | |
18 | respond_to do |format| |
19 | format.html # show.html.erb |
20 | format.xml { render :xml => @<%= file_name %> } |
21 | end |
22 | end |
23 | |
24 | # GET /<%= table_name %>/new |
25 | # GET /<%= table_name %>/new.xml |
26 | def new |
27 | @<%= file_name %> = <%= class_name %>.new |
28 | |
29 | respond_to do |format| |
30 | format.html # new.html.erb |
31 | format.xml { render :xml => @<%= file_name %> } |
32 | end |
33 | end |
34 | |
35 | # GET /<%= table_name %>/1/edit |
36 | def edit |
37 | @<%= file_name %> = <%= class_name %>.find(params[:id]) |
38 | end |
39 | |
40 | # POST /<%= table_name %> |
41 | # POST /<%= table_name %>.xml |
42 | def create |
43 | @<%= file_name %> = <%= class_name %>.new(params[:<%= file_name %>]) |
44 | |
45 | respond_to do |format| |
46 | if @<%= file_name %>.save |
47 | format.html { redirect_to(@<%= file_name %>, :notice => '<%= class_name %> was successfully created.') } |
48 | format.xml { render :xml => @<%= file_name %>, :status => :created, :location => @<%= file_name %> } |
49 | else |
50 | format.html { render :action => "new" } |
51 | format.xml { render :xml => @<%= file_name %>.errors, :status => :unprocessable_entity } |
52 | end |
53 | end |
54 | end |
55 | |
56 | # PUT /<%= table_name %>/1 |
57 | # PUT /<%= table_name %>/1.xml |
58 | def update |
59 | @<%= file_name %> = <%= class_name %>.find(params[:id]) |
60 | |
61 | respond_to do |format| |
62 | if @<%= file_name %>.update_attributes(params[:<%= file_name %>]) |
63 | format.html { redirect_to(@<%= file_name %>, :notice => '<%= class_name %> was successfully updated.') } |
64 | format.xml { head :ok } |
65 | else |
66 | format.html { render :action => "edit" } |
67 | format.xml { render :xml => @<%= file_name %>.errors, :status => :unprocessable_entity } |
68 | end |
69 | end |
70 | end |
71 | |
72 | # DELETE /<%= table_name %>/1 |
73 | # DELETE /<%= table_name %>/1.xml |
74 | def destroy |
75 | @<%= file_name %> = <%= class_name %>.find(params[:id]) |
76 | @<%= file_name %>.destroy |
77 | |
78 | respond_to do |format| |
79 | format.html { redirect_to(<%= table_name %>_url) } |
80 | format.xml { head :ok } |
81 | end |
82 | end |
83 | end |