lathe 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  <div>
2
2
  <div>标题:{title}</div>
3
- 这是mobile的展示表单,位置在 app/templates/mobile/mini_apps/<%=app_name%>/new.js.dust
3
+ 这是mobile的展示表单,位置在 app/templates/mobile/mini_apps/<%=app_name%>/show.js.dust
4
4
  </div>
@@ -7,7 +7,6 @@ jQuery(function($) {
7
7
  //在这里可以把服务器返回的properties进行进一步解析
8
8
  return model;
9
9
  },
10
- initialize: function(options) {},
11
10
  serialize: function() {
12
11
  //这里传递给模板渲染的对象
13
12
  var context = this.model.toJSON();
@@ -1,8 +1,8 @@
1
- module <%=app_path.camelize%>
1
+ module <%=package%>
2
2
  class <%=app_class%>Controller < MiniApps::BaseController
3
3
  def show
4
4
  #手机端的webview请求会请求此controller
5
- service = MiniAppStudy::Service.new
5
+ service = <%=package%>::Service.new
6
6
  inst = service.find_instance_by_id(params[:id])
7
7
  @model = service.dump_to_hash(inst,false)
8
8
  render_base
@@ -1,5 +1,5 @@
1
1
  module <%=package%>
2
- class Servicje < MiniApp
2
+ class Service < MiniApp
3
3
 
4
4
  #处理miniapp创建的请求
5
5
  # * *Args* :
@@ -46,10 +46,10 @@ module <%=package%>
46
46
  # * *Args* :
47
47
  # - +instance+ -> <%=app_class%>Model实例
48
48
  # - +include_ref+ -> 是否需要包括references,默认是需要包含的,只有当需要单独请求这一个miniapp对象的json时,需要填充整个model对象,比如,json对象中存在user_id,同时也需要填充user对象,确保前端解析时存在该实体对象。
49
- # def dump_to_hash(instance,include_ref=true)
49
+ def dump_to_hash(instance,include_ref=true)
50
50
  {
51
51
  :api_url=>"/#{API::prefix}/#{API::versions[0]}/mmodules/<%=app_name%>/#{instance.id}",
52
- :m_url=>"/mini_apps/<%=app_name%>/#{id}",
52
+ :m_url=>"/mini_apps/<%=app_name%>/#{instance.id}",
53
53
  :title=>instance.title
54
54
  }
55
55
  end
data/lib/lathe/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lathe
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lathe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: