Skip to content
Browse files

Updated the gemspec and changed the namer to switch / for _.

  • Loading branch information...
1 parent a41807a commit a90ffe57ba2fefc658db1f54b2e8ced04506087d @hopsoft committed Apr 9, 2012
Showing with 6 additions and 3 deletions.
  1. +1 −0 .gitignore
  2. +2 −1 coast.gemspec
  3. +3 −2 lib/coast.rb
View
1 .gitignore
@@ -1,2 +1,3 @@
.rvmrc
.tmp
+*.gem
View
3 coast.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "coast"
- s.version = "1.0.0"
+ s.version = "0.9.0"
s.date = "2012-04-06"
s.summary = "Coast"
s.description = "Resourceful behavior for Rails controllers with a Sinatra like DSL."
@@ -9,4 +9,5 @@ Gem::Specification.new do |s|
s.files = [ "lib/coast.rb" ]
s.homepage ="https://github.com/hopsoft/coast"
s.add_dependency("activesupport")
+ s.license = "MIT"
end
View
5 lib/coast.rb
@@ -249,8 +249,9 @@ def init_instance_variables
def item_instance_var_name
return @item_instance_var_name if @item_instance_var_name
- name = resourceful_model.name.underscore
- @item_instance_var_name ||= "@#{name[(name.rindex(/\//) + 1)..-1]}"
+ name = resourceful_model.name.underscore.gsub("/", "_")
+ puts name
+ @item_instance_var_name ||= "@#{name}"
end
def list_instance_var_name

0 comments on commit a90ffe5

Please sign in to comment.
Something went wrong with that request. Please try again.