inline_forms 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/inline_forms +25 -7
- data/lib/app/helpers/inline_forms_helper.rb +1 -2
- data/lib/inline_forms/version.rb +1 -1
- metadata +4 -4
data/bin/inline_forms
CHANGED
@@ -73,7 +73,7 @@ gem 'jquery-rails'
|
|
73
73
|
gem 'mysql2'
|
74
74
|
gem 'capistrano'
|
75
75
|
gem 'will_paginate', :git => 'git://github.com/acesuares/will_paginate.git', :branch => 'rails3'
|
76
|
-
gem 'tabs_on_rails', :git => 'git
|
76
|
+
gem 'tabs_on_rails', :git => 'git://github.com/acesuares/tabs_on_rails.git', :branch => 'add_remote'
|
77
77
|
gem 'ckeditor', :git => 'git://github.com/acesuares/ckeditor.git', :branch => 'master'
|
78
78
|
gem 'carrierwave'
|
79
79
|
gem 'remotipart', '~> 1.0'
|
@@ -118,7 +118,7 @@ else
|
|
118
118
|
development_stanza = "
|
119
119
|
development:
|
120
120
|
adapter: mysql2
|
121
|
-
database: #{app_name}
|
121
|
+
database: #{app_name}_dev
|
122
122
|
username: #{app_name}
|
123
123
|
password: #{app_name}
|
124
124
|
|
@@ -126,18 +126,18 @@ else
|
|
126
126
|
production_stanza = "
|
127
127
|
production:
|
128
128
|
adapter: mysql2
|
129
|
-
database: #{app_name}
|
129
|
+
database: #{app_name}_p
|
130
130
|
username: #{app_name}
|
131
131
|
password: #{app_name}444
|
132
132
|
|
133
133
|
"
|
134
134
|
File.open( 'config/database.yml', 'w') {|f| f.write(development_stanza + production_stanza) }
|
135
135
|
|
136
|
-
puts "CREATE #{app_name}
|
137
|
-
system("sudo mysqladmin create #{app_name}
|
136
|
+
puts "CREATE #{app_name}_dev database"
|
137
|
+
system("sudo mysqladmin create #{app_name}_dev")
|
138
138
|
|
139
|
-
puts "GRANT ALL ON #{app_name}
|
140
|
-
system("echo \"GRANT ALL ON #{app_name}
|
139
|
+
puts "GRANT ALL ON #{app_name}_dev.* to '#{app_name}'@'localhost' identified by '#{app_name}'"
|
140
|
+
system("echo \"GRANT ALL ON #{app_name}_dev.* to '#{app_name}'@'localhost' identified by '#{app_name}';\" | sudo mysql -v mysql")
|
141
141
|
system('echo "FLUSH PRIVILEGES;" | sudo mysql mysql')
|
142
142
|
|
143
143
|
end
|
@@ -183,6 +183,24 @@ header_src = "
|
|
183
183
|
FileUtils.mkdir_p 'app/views/inline_forms'
|
184
184
|
File.open( 'app/views/inline_forms/_header.html.erb', 'w') {|f| f.write(header_src) }
|
185
185
|
|
186
|
+
puts "Set application_name and _title in ApplicationHelper...\n"
|
187
|
+
app_helper = "
|
188
|
+
module ApplicationHelper
|
189
|
+
def application_name
|
190
|
+
#{app_name}
|
191
|
+
end
|
192
|
+
def application_title
|
193
|
+
#{app_name}
|
194
|
+
end
|
195
|
+
end
|
196
|
+
"
|
197
|
+
#File.open( 'app/helpers/application_helper.rb', 'w') {|f| f.write(app_helper) }
|
198
|
+
|
199
|
+
|
200
|
+
#puts "Injecting precompile assets stuff in production.rb...\n"
|
201
|
+
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
202
|
+
# config.assets.precompile += %w( inline_forms_application.js inline_forms_application.css devise.css )
|
203
|
+
|
186
204
|
puts "Capify...\n"
|
187
205
|
system('capify .')
|
188
206
|
|
@@ -66,12 +66,11 @@ module InlineFormsHelper
|
|
66
66
|
|
67
67
|
# link_to_inline_edit
|
68
68
|
def link_to_inline_edit(object, attribute, attribute_value='')
|
69
|
-
attribute_value = h(attribute_value)
|
70
69
|
spaces = attribute_value.length > 40 ? 0 : 40 - attribute_value.length
|
71
70
|
attribute_value << " ".html_safe * spaces
|
72
71
|
css_class_id = "#{object.class.to_s.underscore}_#{object.id}_#{attribute}"
|
73
72
|
if cancan_disabled? || ( can? :update, object )
|
74
|
-
link_to attribute_value,
|
73
|
+
link_to attribute_value.html_safe,
|
75
74
|
send( 'edit_' + object.class.to_s.underscore + '_path',
|
76
75
|
object,
|
77
76
|
:attribute => attribute.to_s,
|
data/lib/inline_forms/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inline_forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
9
|
+
- 6
|
10
|
+
version: 1.3.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ace Suares
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-03-05 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rspec-rails
|