-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtodo.txt
250 lines (132 loc) · 4.59 KB
/
todo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Title: .
-----------------------2017-01-03[Jan-Tue]08-35AM
1.
done.
edit gitignore to include sqlite db
2.
done.
may do more later..
add docs to generated proj to indicate bashrail version x made this..
include relevant files like 1mk.sh
3.
done.
currently getting html response from curl / json create product request.
how to get json response?
curl gives different html response.
idea:
# POST /products
def create
# @product = Product.new(product_params)
# if @product.save
# redirect_to @product, notice: 'Product was successfully created.'
# else
# render :new
# end
# http://www.justinweiss.com/articles/respond-to-without-all-the-pain/
@product = Product.new(product_params)
flash[:notice] = "Product was successfully created." if @product.save
respond_with(@product)
end
4.
done.
user2 resource
gem install schema_to_scaffold
scaffold
rails generate scaffold User2 email:string encrypted_password:string reset_password_token:string reset_password_sent_at:datetime remember_created_at:datetime sign_in_count:integer current_sign_in_at:datetime last_sign_in_at:datetime current_sign_in_ip:string last_sign_in_ip:string confirmation_token:string confirmed_at:datetime confirmation_sent_at:datetime unconfirmed_email:string failed_attempts:integer unlock_token:string locked_at:datetime name:string role:references --no-migration
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# add new lines of text after patrn...
filetarg='app/models/user2.rb'
r1tmp="/tmp/_temprubyrunner_${USER}.rb"
cat << 'HEREDOC' > $r1tmp
repl2 = %Q{
self.table_name = 'users'
}
ARGF.each do |line|
puts line
puts repl2 if line =~ /class/
end
HEREDOC
ruby $r1tmp $filetarg > $filetarg.tmp
cp $filetarg.tmp $filetarg; rm $filetarg.tmp
### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5.
C:\n\Dropbox\csd\serve\vboxyard\bashrail\docs\rails,form_for add required field indicator,mark,form_builder_know.txt
2018-03-05
6.
done.
fix ugly formatting of field with validation errors
It moved to the left and spread out vertically.
2018-03-05
7.
uncomment
## == PaperTrail ==
# config.audit_with :paper_trail, 'User', 'PaperTrail::Version' # PaperTrail >= 3.0.0
in rails_admin.rb
8.
done.
Ad version table to rails admin..
rails g model Version --no-migration
9.
done.
2019-10-02
use seeder.rake not populator.
10.
done.
2019-10-02
change application.js for jquery autocomplete
11.
done.
2019-10-02
CanCan::Error in ProductsController#index
Subject is required for dashboard
can :dashboard # allow access to dashboard
Should be.. can :dashboard, :all
12.
done.
2019-10-02
rails_admin
NoMethodError in RailsAdmin::MainController#dashboard undefined method `new' for nil:NilClass
change sftp://192.168.88.39/srv/web/2rail/brail484b21/config/initializers/rails_admin.rb
from cancan to CanCanCan
13.
done.
2019-10-03
undefined method `before_filter' for ProductsController:Class Did you mean? before_action
14.
2019-11-06
add mailer to products
15.
done?
2019-11-06
add cors or change cors to all methods. put is missing.
see qtag486 1a41aa7\ 2019-11-06 (HEAD -> master, origin/master)\ changed cors method\ [David Glebagit]
16.
done?
2019-11-06
add file upload features for json api
instructions.
get file-url json response
see qtag486 1a96668\ 2019-11-06\ added code to return avatar url to json 2019-11-06\ [David Glebagit]
17.
see qtag486 4542004\ 2019-11-06\ opened up more console logging 2019-11-06\ [David Glebagit]
18.
s/before_filter/before_action/ 2020-10-23
# grep -l for filenames only..
#
ftmp=/tmp/filelist.tmp.91001.txt
grep 'before_filter' -ria -l --include={*.rb,} --exclude-dir={tmp,bin,shared,log,nbproject,templates_c,backup,test,test2} --exclude={*.sublime-workspace,*.geany,error_log,*.msg,___check.these___,*.sql,java*.*,JAVA*.*,*.csv,*.CSV,*.txt,*.log} . >$ftmp
cat $ftmp
# next, do the work..
while read Ft ; do
echo $Ft ; sed -i -e 's/before_filter/before_action/' $Ft ;
done <$ftmp
19.
rails_admin 2.02 NoMethodError in RailsAdmin::MainController#dashboard undefined method `new' for nil:NilClass @authorization_adapter = klass.new(*([self] + args).compact)
I just debugged it and it's from the rails_admin initializer.
You'll need to update config.authorize_with and set it as :cancancan instead of :cancan.
20.
rename product table to Z9product.
also Z9country, Z9feature, Z9product_feature
2021-01-31