rails_view_component 1.0.3 → 1.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 73aec409805699ca0d34223e5426908ddd5cd819
4
- data.tar.gz: aade2809cccfe5ddae61be15430dc19600da93c2
3
+ metadata.gz: e4f4690f3c89bdc96ee2037c670ea671de3381c1
4
+ data.tar.gz: 9d6656809d7b0a21d236c1b6b1a703c1e892a6b5
5
5
  SHA512:
6
- metadata.gz: 9f172677794212c4415500067790c4cf3baf1a3fad16545a076d28fe70affddc8a5faf4df594644cd824385af036b73f5b5d931c4ba2876b12a578e257bc7800
7
- data.tar.gz: b5bb65cb365ef3009546bc014999b7855addfa45c4a80606c4970fff73c865d3bae4b5367d4f742c46c122bca9bf158d0885e2c7f8d5230fd46703853d86a254
6
+ metadata.gz: f5017de8faa43b82f91a77006374272ecb34ef5cfe414950a6ef55602dcd1acc1846304d8ab32ac9e6868873d9280771f7ce4c735bd741d4d70472076f4feab2
7
+ data.tar.gz: dca47336c4f93393d738363309a83ec8af94211fb0bcaa04f039c4d457b10aa4b857a8a26983ec63a980cafd887a5f5dcf0af068efde090aafcafa08f78eab6c
@@ -3,14 +3,14 @@ class RailsViewComponentBuilder
3
3
  @count = 0
4
4
  @components = []
5
5
  end
6
- def destribute name, erb_params={}, ajax_params = {}
6
+ def destribute name, ajax_params = {}, erb_params={}
7
7
  namespace = name.to_s.camelize
8
8
  name = namespace.split("::").last
9
9
  @count += 1
10
10
  klass = Module.const_get("#{namespace}::#{name}Model")
11
11
  obj = klass.new @count
12
12
  @components.push obj
13
- obj.html(erb_params, ajax_params).html_safe
13
+ obj.html(ajax_params, erb_params).html_safe
14
14
  end
15
15
 
16
16
  def all_javascripts
@@ -20,7 +20,7 @@ class RailsViewComponentModel
20
20
  []
21
21
  end
22
22
 
23
- def html erb_params={}, ajax_params={}
23
+ def html ajax_params={}, erb_params={}
24
24
  action_view = ActionView::Base.new "#{Rails.root}/app/rails_view_components/#{@dir}/views"
25
25
  erb_params.each{|k,v| action_view.assign(k=>v) }
26
26
  ajax_params.each{|k,v| action_view.assign(k=>v) }
@@ -1,3 +1,3 @@
1
1
  module RailsViewComponent
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_view_component
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takeshi Kojima