Experimenting with Netzke/ ExtJS

This commit is contained in:
Jason Denney
2012-12-23 09:02:07 -05:00
parent ead5f7b433
commit d7f5eb26bf
18 changed files with 345 additions and 51 deletions
+22
View File
@@ -0,0 +1,22 @@
class UserProfiles < Netzke::Basepack::Grid
def configure(c)
super
c.model = "UserProfile"
c.data_store = {auto_load: false}
c.scope = lambda { |rel| puts session.inspect; rel.where(:user_id => session[:selected_user_id]);}
c.columns = [
{ :name => :bike__serial_number},
:addrStreet1,
:addrStreet2,
:addrCity,
:addrState,
:addrZip,
:phone
]
end
#override with nil to remove actions
def default_bbar
[ :apply, :add_in_form ]
end
end