mobile_on_rails 0.0.6 → 0.0.7
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.
- checksums.yaml +4 -4
- data/lib/mobile_on_rails.rb +14 -4
- data/lib/mobile_on_rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 447eafe667ea33e3dca5c6a5164944c834c7c106
|
|
4
|
+
data.tar.gz: 9c57af23899d3c3289bac2fe055446c9b3080c80
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f1f946a64ef245127686d26228ed6adff67c97ba96cf88133ad95b5bddd34bf1c72934c295c9125efc18f97f1a0705594fe41bcd66426063a4467540712f390c
|
|
7
|
+
data.tar.gz: 48940a96281cf4428354061db917e2a04ad17db83492624a5612d2913902d3315edd3f3c864e003ff61b3bd3432932e3244db14ddea95d4d4debeeffd68f8a18
|
data/lib/mobile_on_rails.rb
CHANGED
|
@@ -83,7 +83,7 @@ end})}
|
|
|
83
83
|
@user = MorUser.find_by_user_name(@json_data.values[1])
|
|
84
84
|
|
|
85
85
|
@post = MorPost.new
|
|
86
|
-
@post.
|
|
86
|
+
@post.mor_user_id = @user.id
|
|
87
87
|
@post.title = @json_data.values[0]
|
|
88
88
|
@post.text = @json_data.values[2]
|
|
89
89
|
if @post.save
|
|
@@ -160,9 +160,19 @@ end')}
|
|
|
160
160
|
params.require(:user).permit(:email, :password, :password_confirmation)
|
|
161
161
|
end
|
|
162
162
|
end')}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
File.open("#{directory}/config/routes.rb", "r+") do |f|
|
|
164
|
+
firstline = f.readline
|
|
165
|
+
f.write(
|
|
166
|
+
"
|
|
167
|
+
resources :mor_sessions, only: [:new, :create, :destroy]
|
|
168
|
+
resources :mor_posts
|
|
169
|
+
match '/mor_posts/all', to: 'mor_posts#all', via: 'post'
|
|
170
|
+
")
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
puts "Files created! Remember to run rake:db migrate to create your"
|
|
174
|
+
puts "database tables, and add BCrypt to your Gemfile (it should be"
|
|
175
|
+
puts "there already, just commented out) and run 'bundle install'."
|
|
166
176
|
end
|
|
167
177
|
end
|
|
168
178
|
|